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|
|
||||
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
|
||||
|
|
|
@ -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{
|
||||
|
|
Loading…
Reference in a new issue