summaryrefslogtreecommitdiff
path: root/test/ruby/test_parse.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-11-11 09:35:37 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-11-11 09:38:14 +0900
commitade038889468e7755d7ebfe75975e0e77d1e1dec (patch)
tree33319d9eda7d2dd56f85da6a1db182ac3a745b87 /test/ruby/test_parse.rb
parentb42656b9c403da1bac8e1dd7534f0a7a09df67b0 (diff)
Fixed embedded document with EOF char
Diffstat (limited to 'test/ruby/test_parse.rb')
-rw-r--r--test/ruby/test_parse.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ruby/test_parse.rb b/test/ruby/test_parse.rb
index ee5f815fd6..2622ec529c 100644
--- a/test/ruby/test_parse.rb
+++ b/test/ruby/test_parse.rb
@@ -709,6 +709,15 @@ x = __ENCODING__
def test_embedded_rd
assert_valid_syntax("=begin\n""=end")
+ assert_valid_syntax("=begin\n""=end\0")
+ assert_valid_syntax("=begin\n""=end\C-d")
+ assert_valid_syntax("=begin\n""=end\C-z")
+ end
+
+ def test_embedded_rd_error
+ error = 'embedded document meets end of file'
+ assert_syntax_error("=begin\n", error)
+ assert_syntax_error("=begin", error)
end
def test_float