Sha256: 8e1cdd5a6a96a65d2bd6bd540ea8c31ca8bf644ddacfec295125bd586bbbdfbe

Contents?: true

Size: 660 Bytes

Versions: 1

Compression:

Stored size: 660 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.3 test/functional/simple_program_test.rb