Sha256: eb274350560cac59b662069794d9ffc44534eff61b799a571d03a799507fba3c
Contents?: true
Size: 510 Bytes
Versions: 3
Compression:
Stored size: 510 Bytes
Contents
require 'helper' class TestParser < Test::Unit::TestCase EXPRESSIONS = File.readlines(File.join(File.dirname(__FILE__), "test_parser")) BUILD = File.readlines(File.join(File.dirname(__FILE__), "test_parser_build")) context "The Parser" do EXPRESSIONS.each_with_index do |expr, i| parser = PLang::Parser::SyntaxAnalyser.new(EXPRESSIONS[i]) should "parse the expression ##{i}" do assert_equal eval(parser.parse.inspect), eval(BUILD[i]) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
p-lang-0.3.1 | test/test_parser.rb |
p-lang-0.3.0 | test/test_parser.rb |
p-lang-0.2.0 | test/test_parser.rb |