Sha256: af6019caf13bd1c82ecbcb2501faa9489737c8d0fd43a46005818ef51572f9aa

Contents?: true

Size: 700 Bytes

Versions: 1

Compression:

Stored size: 700 Bytes

Contents

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

class SimpleProgramTest < Test::Unit::TestCase

  include KoiReferenceParser
  
  test "should parse simple program with 'if' flow control" do
    assert_nothing_raised do
      Parser.parse(<<-EOD)
      
        test = 1
      
        if(test == 1)
          test = "yay"
        end
        
      EOD
    end
  end
  
  test "should parse simple program with 'unless' flow control" do
    assert_nothing_raised do
      Parser.parse(<<-EOD)
      
        test = 1
      
        unless(test == 1)
          test = "yay"
        end
        
      EOD
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
koi-reference-parser-0.0.1 test/parser/functional/simple_program_test.rb