diff options
| author | Marc-Andre Lafortune <github@marc-andre.ca> | 2020-08-13 21:50:16 -0400 |
|---|---|---|
| committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-09-28 18:07:24 +0900 |
| commit | 97d1a381e112e843ff014a05a083e42165b7bb01 (patch) | |
| tree | 5c995202ecb3de5101ef45e9bc749537f7539faf /test/racc/test_racc_command.rb | |
| parent | 3da3c2747feb0c4a122182792150a49012bed1a6 (diff) | |
[Fixes #137] Improve reporting
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 |
