diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-08-26 07:25:08 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-08-26 07:25:08 +0000 |
commit | a6a85a0cb755f4e65fd15c2554c5bcd529c66ed9 (patch) | |
tree | 35754fad15d6ece5bf7871c0bdea66aff4581494 /test/ruby/test_syntax.rb | |
parent | 1a3bcf103c582b20e9ea70dfed0ee68b24243f55 (diff) | |
download | ruby-a6a85a0cb755f4e65fd15c2554c5bcd529c66ed9.tar.gz |
parse.y: warn CR
* parse.y (parser_nextc): warn carriage return in middle of line.
[ruby-core:56240] [Feature #8699]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_syntax.rb')
-rw-r--r-- | test/ruby/test_syntax.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb index f5ff8a7810..04fcd20a56 100644 --- a/test/ruby/test_syntax.rb +++ b/test/ruby/test_syntax.rb @@ -385,6 +385,13 @@ eom assert_syntax_error("__END__\r<<<<<\n", /unexpected <</) end + def test_warning_for_cr + feature8699 = '[ruby-core:56240] [Feature #8699]' + assert_warning(/encountered \\r/, feature8699) do + eval("\r""__id__\r") + end + end + private def not_label(x) @result = x; @not_label ||= nil end |