diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2019-05-13 21:25:22 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2019-06-19 18:17:25 +0900 |
commit | 1a2546c2be839baa7d0a50dc056d4d6987d26852 (patch) | |
tree | 19fef5d8b8d96452a51ab68e8093ea895192ca27 /test/racc/test_grammar_file_parser.rb | |
parent | cbe06cd3501fdadd0e6e63094da2973484d70b0b (diff) | |
download | ruby-1a2546c2be839baa7d0a50dc056d4d6987d26852.tar.gz |
Backport racc-1.4.15 from upstream.
Diffstat (limited to 'test/racc/test_grammar_file_parser.rb')
-rw-r--r-- | test/racc/test_grammar_file_parser.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/racc/test_grammar_file_parser.rb b/test/racc/test_grammar_file_parser.rb new file mode 100644 index 0000000000..b187bdcaec --- /dev/null +++ b/test/racc/test_grammar_file_parser.rb @@ -0,0 +1,15 @@ +require File.expand_path(File.join(File.dirname(__FILE__), 'helper')) + +module Racc + class TestGrammarFileParser < TestCase + def test_parse + file = File.join(ASSET_DIR, 'yyerr.y') + + debug_flags = Racc::DebugFlags.parse_option_string('o') + assert debug_flags.status_logging + + parser = Racc::GrammarFileParser.new(debug_flags) + parser.parse(File.read(file), File.basename(file)) + end + end +end |