summaryrefslogtreecommitdiff
path: root/bootstraptest
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-10-23 01:05:14 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-10-23 01:05:52 +0900
commit801a11d0ab3e1d387b5aaed92d1965fbdf675780 (patch)
treed3d793d3c1e1a6967ae5713757fdf2a4f90782f3 /bootstraptest
parent1a80ee4573eef24ed7465b5c5d72dc085c74c4ff (diff)
Relaxed tests for CPDEBUG mode
Diffstat (limited to 'bootstraptest')
-rw-r--r--bootstraptest/test_eval.rb3
-rw-r--r--bootstraptest/test_jump.rb7
2 files changed, 6 insertions, 4 deletions
diff --git a/bootstraptest/test_eval.rb b/bootstraptest/test_eval.rb
index 8e90ac2728..fa04323b7f 100644
--- a/bootstraptest/test_eval.rb
+++ b/bootstraptest/test_eval.rb
@@ -190,7 +190,8 @@ assert_equal %q{[10, main]}, %q{
}
%w[break next redo].each do |keyword|
- assert_match %r"Can't escape from eval with #{keyword}\z", %{
+ assert_match %r"Can't escape from eval with #{keyword}\b", %{
+ STDERR.reopen(STDOUT)
begin
eval "0 rescue #{keyword}"
rescue SyntaxError => e
diff --git a/bootstraptest/test_jump.rb b/bootstraptest/test_jump.rb
index 595aaa7c4b..7944915862 100644
--- a/bootstraptest/test_jump.rb
+++ b/bootstraptest/test_jump.rb
@@ -146,15 +146,16 @@ assert_equal %q{131}, %q{
end
}
}
-assert_equal %q{ok}, %q{
+assert_match %r{Invalid retry}, %q{
+STDERR.reopen(STDOUT)
begin
eval %q{
1.times{
retry
}
}
-rescue SyntaxError
- :ok
+rescue SyntaxError => e
+ e.message
end
}
assert_equal %q{3}, %q{