diff options
Diffstat (limited to 'test/racc/test_racc_command.rb')
-rw-r--r-- | test/racc/test_racc_command.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/racc/test_racc_command.rb b/test/racc/test_racc_command.rb index b4fc0c6745..f1116a371f 100644 --- a/test/racc/test_racc_command.rb +++ b/test/racc/test_racc_command.rb @@ -318,5 +318,20 @@ module Racc assert_debugfile 'tp_plus.y', [21, 0, 0, 0] assert_output_unchanged 'tp_plus.y' end + + def test_ifelse + stderr = nil + racc "-o#{@TAB_DIR}/ifelse", "#{ASSET_DIR}/ifelse.y", stdout_filter: ->(s) { stderr = s } + stderr = stderr.lines[1..-1].join if RUBY_PLATFORM.match? /java/ + assert_equal(<<~STDERR, stderr) + 1 useless nonterminals: + dummy + 2 useless rules: + #4 (dummy) + #5 (dummy) + 1 shift/reduce conflicts + Turn on logging with "-v" and check ".output" file for details + STDERR + end end end |