summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/racc/helper.rb12
-rw-r--r--test/racc/test_racc_command.rb6
2 files changed, 9 insertions, 9 deletions
diff --git a/test/racc/helper.rb b/test/racc/helper.rb
index 035c76a1e3..7dce020747 100644
--- a/test/racc/helper.rb
+++ b/test/racc/helper.rb
@@ -42,7 +42,7 @@ module Racc
end
end
- def assert_compile(asset, args = [])
+ def assert_compile(asset, args = [], **opt)
file = File.basename(asset, '.y')
args = ([args].flatten) + [
"#{ASSET_DIR}/#{file}.y",
@@ -50,7 +50,7 @@ module Racc
"-O#{OUT_DIR}/#{file}",
"-o#{TAB_DIR}/#{file}",
]
- racc *args
+ racc *args, **opt
end
def assert_debugfile(asset, ok)
@@ -91,12 +91,12 @@ module Racc
"expectation. Try compiling it and diff with test/regress/#{file}.")
end
- def racc(*arg)
- ruby "-S", RACC, *arg
+ def racc(*arg, **opt)
+ ruby "-S", RACC, *arg, **opt
end
- def ruby(*arg)
- assert_ruby_status(["-C", TEMP_DIR, *arg])
+ def ruby(*arg, **opt)
+ assert_ruby_status(["-C", TEMP_DIR, *arg], **opt)
end
end
end
diff --git a/test/racc/test_racc_command.rb b/test/racc/test_racc_command.rb
index 22915385ba..fcbe8471e7 100644
--- a/test/racc/test_racc_command.rb
+++ b/test/racc/test_racc_command.rb
@@ -164,13 +164,13 @@ module Racc
# .y files from `parser` gem
def test_ruby18
- assert_compile 'ruby18.y'
+ assert_compile 'ruby18.y', [], timeout: 60
assert_debugfile 'ruby18.y', []
# assert_output_unchanged 'ruby18.y'
end
def test_ruby22
- assert_compile 'ruby22.y'
+ assert_compile 'ruby22.y', [], timeout: 60
assert_debugfile 'ruby22.y', []
# assert_output_unchanged 'ruby22.y'
end
@@ -186,7 +186,7 @@ module Racc
# .y file from opal gem
def test_opal
- assert_compile 'opal.y'
+ assert_compile 'opal.y', [], timeout: 60
assert_debugfile 'opal.y', []
# assert_output_unchanged 'opal.y'
end