mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Relaxed tests for CPDEBUG mode
This commit is contained in:
parent
1a80ee4573
commit
801a11d0ab
2 changed files with 6 additions and 4 deletions
|
@ -190,7 +190,8 @@ assert_equal %q{[10, main]}, %q{
|
||||||
}
|
}
|
||||||
|
|
||||||
%w[break next redo].each do |keyword|
|
%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
|
begin
|
||||||
eval "0 rescue #{keyword}"
|
eval "0 rescue #{keyword}"
|
||||||
rescue SyntaxError => e
|
rescue SyntaxError => e
|
||||||
|
|
|
@ -146,15 +146,16 @@ assert_equal %q{131}, %q{
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
assert_equal %q{ok}, %q{
|
assert_match %r{Invalid retry}, %q{
|
||||||
|
STDERR.reopen(STDOUT)
|
||||||
begin
|
begin
|
||||||
eval %q{
|
eval %q{
|
||||||
1.times{
|
1.times{
|
||||||
retry
|
retry
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rescue SyntaxError
|
rescue SyntaxError => e
|
||||||
:ok
|
e.message
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
assert_equal %q{3}, %q{
|
assert_equal %q{3}, %q{
|
||||||
|
|
Loading…
Add table
Reference in a new issue