Skip to content

Commit

Permalink
Assert no warning from embedded parser-text.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Jun 10, 2023
1 parent 639cd0d commit f12af30
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 8 additions & 4 deletions test/case.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ def assert_debugfile(asset, ok)
end
end

def assert_exec(asset)
def assert_exec(asset, **opts)
file = File.basename(asset, '.y')
ruby "-I#{LIB_DIR}", "#{@TAB_DIR}/#{file}"
ruby "-I#{LIB_DIR}", "-rracc/parser", "#{@TAB_DIR}/#{file}", **opts
end

def strip_version(source)
Expand All @@ -101,8 +101,12 @@ def racc(*arg, **opt)
ruby "-I#{LIB_DIR}", "-S", RACC, *arg, **opt
end

def ruby(*arg, **opt)
assert_ruby_status(["-C", @TEMP_DIR, *arg], **opt)
def ruby(*arg, quiet: false, **opt)
if quiet
assert_in_out_err(["-C", @TEMP_DIR, *arg], **opt)
else
assert_ruby_status(["-C", @TEMP_DIR, *arg], **opt)
end
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion test/test_racc_command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def test_chk_y
def test_echk_y
assert_compile 'echk.y', '-E'
assert_debugfile 'echk.y', []
assert_exec 'echk.y'
assert_exec 'echk.y', quiet: true
end

def test_err_y
Expand Down

0 comments on commit f12af30

Please sign in to comment.