Sha256: 8ec480cf49ba2ee13ebe88014d3b2442a966c8b70ae444eab02bce6f2c781fbd

Contents?: true

Size: 671 Bytes

Versions: 1

Compression:

Stored size: 671 Bytes

Contents

require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'test_helper.rb'))

class StatementTest < Test::Unit::TestCase

  include KoiReferenceParser

  test "should parse statments on separate lines as separate" do
    tree = Parser.parse("test = 1\ntest = 1")
    assert_kind_of Block, tree
    assert_kind_of Statement, tree.elements[0]
    assert_kind_of Statement, tree.elements[1]
  end
  
  test "should parse statements on same line separated by ';' as separate" do
    tree = Parser.parse("test = 1;test = 1")
    assert_kind_of Block, tree
    assert_kind_of Statement, tree.elements[0]
    assert_kind_of Statement, tree.elements[1]
  end
  

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
koi-reference-parser-0.0.2 test/parser/unit/statement_test.rb