1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* test/ruby: make more ruby-mode.el friendly.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2010-04-20 01:46:52 +00:00
parent dd3bbc6005
commit 8a3201dae6
2 changed files with 8 additions and 8 deletions

View file

@ -517,8 +517,8 @@ class TestParse < Test::Unit::TestCase
x = nil
assert_raise(SyntaxError) do
eval %q(
<<FOO
eval %Q(
<\<FOO
)
end
@ -531,8 +531,8 @@ FOO
end
assert_raise(SyntaxError) do
eval %q(
<<"
eval %Q(
<\<\"
)
end
@ -558,7 +558,7 @@ FOO
end
assert_nothing_raised do
eval "x = <<FOO\r\n1\r\nFOO"
eval "x = <<""FOO\r\n1\r\nFOO"
end
assert_equal("1\n", x)
end

View file

@ -145,7 +145,7 @@ class TestRegexp < Test::Unit::TestCase
assert_equal('//', //.inspect)
assert_equal('//i', //i.inspect)
assert_equal('/\//i', /\//i.inspect)
assert_equal('/\//i', /#{'/'}/i.inspect)
assert_equal('/\//i', %r"#{'/'}"i.inspect)
assert_equal('/\/x/i', /\/x/i.inspect)
assert_equal('/\x00/i', /#{"\0"}/i.inspect)
assert_equal("/\n/i", /#{"\n"}/i.inspect)
@ -477,7 +477,7 @@ class TestRegexp < Test::Unit::TestCase
end.value
assert(m.tainted?)
assert_nothing_raised('[ruby-core:26137]') {
m = proc {$SAFE = 4; /#{}/o}.call
m = proc {$SAFE = 4; %r"#{}"o}.call
}
assert(m.tainted?)
end
@ -496,7 +496,7 @@ class TestRegexp < Test::Unit::TestCase
end
def failcheck(re)
assert_raise(RegexpError) { /#{ re }/ }
assert_raise(RegexpError) { %r"#{ re }" }
end
def test_parse