Relaxed tests for CPDEBUG mode
This commit is contained in:
parent
1a80ee4573
commit
801a11d0ab
@ -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…
x
Reference in New Issue
Block a user