Add a test case for __LINE__
assignment in condition warning
This commit is contained in:
parent
6ec4d203f7
commit
5993d0f5f2
@ -578,6 +578,15 @@ class TestRubyOptions < Test::Unit::TestCase
|
||||
feature4299 = '[ruby-dev:43083]'
|
||||
assert_in_out_err(["-w", t.path], "", [], err, feature4299)
|
||||
assert_in_out_err(["-wr", t.path, "-e", ""], "", [], err, feature4299)
|
||||
|
||||
t.rewind
|
||||
t.truncate(0)
|
||||
t.puts "if a = __LINE__; end"
|
||||
t.flush
|
||||
err = ["#{t.path}:1:#{warning}",
|
||||
]
|
||||
assert_in_out_err(["-w", t.path], "", [], err)
|
||||
assert_in_out_err(["-wr", t.path, "-e", ""], "", [], err)
|
||||
}
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user