Sha256: c4d4e42a57b6c5839d7cc4bf447cf8727240566aca8d407275c297a7bd970a8b
Contents?: true
Size: 531 Bytes
Versions: 1
Compression:
Stored size: 531 Bytes
Contents
require 'test/unit' require 'rockit/dparser' require 'minibasic/minibasic_grammar' class ATestSamplesMinibasic < Test::Unit::TestCase # Test the String regexp by itself since it is special StringTermGrammar = Rockit::DParser::Grammar.new do start :S, [["PRINT", :String, value(1)]] term :String, /"[^"]*"/ end def test_01_string_term parser = StringTermGrammar.new_parser value = parser.parse 'PRINT "a"' assert_equal('"a"', value) end MiniBasicParser = Samples::MiniBasicGrammar.new_parser end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rockit-0.7.1 | tests/acceptance/rockit/dparser/atest_samples_minibasic.rb |