Sha256: 8534617bcafaa57304c636429bd1c2b98def48d2252d89730c270cc74d05ca2a

Contents?: true

Size: 429 Bytes

Versions: 39

Compression:

Stored size: 429 Bytes

Contents

require 'support/parser_helpers'

describe "Block statements" do
  it "should return the direct expression if only one expresssion in block" do
    parsed("42").should == [:int, 42]
  end

  it "should return an s(:block) with all expressions appended for > 1 expression" do
    parsed("42; 43").should == [:block, [:int, 42], [:int, 43]]
    parsed("42; 43\n44").should == [:block, [:int, 42], [:int, 43], [:int, 44]]
  end
end

Version data entries

39 entries across 39 versions & 3 rubygems

Version Path
opal-0.10.6 spec/lib/parser/block_spec.rb
opal-0.10.6.beta spec/lib/parser/block_spec.rb
opal-0.10.5 spec/lib/parser/block_spec.rb
opal-0.10.4 spec/lib/parser/block_spec.rb
opal-0.10.3 spec/lib/parser/block_spec.rb
opal-0.10.2 spec/lib/parser/block_spec.rb
opal-0.10.1 spec/lib/parser/block_spec.rb
opal-0.10.0 spec/lib/parser/block_spec.rb
opal-0.10.0.rc2 spec/lib/parser/block_spec.rb
opal-0.9.4 spec/lib/parser/block_spec.rb
opal-0.9.3 spec/lib/parser/block_spec.rb
opal-0.10.0.rc1 spec/lib/parser/block_spec.rb
opal-0.10.0.beta5 spec/lib/parser/block_spec.rb
opal-0.10.0.beta4 spec/lib/parser/block_spec.rb
opal-0.10.0.beta3 spec/lib/parser/block_spec.rb
opal-0.10.0.beta2 spec/lib/parser/block_spec.rb
opal-0.10.0.beta1 spec/lib/parser/block_spec.rb
opal-0.9.2 spec/lib/parser/block_spec.rb
opal-0.9.0 spec/lib/parser/block_spec.rb
opal-0.9.0.rc1 spec/lib/parser/block_spec.rb