diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2015-01-17 14:31:52 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2015-01-17 14:31:52 +0900 |
commit | 48e65f5743a0e335653007afc59e3aea623ec32a (patch) | |
tree | e0f05d96831ba5b1d6b3dec3169e019313187ea6 /test | |
parent | cb75738e594f9d7f7d4899e0f932fcb55a9ad1e1 (diff) | |
download | psych-48e65f5743a0e335653007afc59e3aea623ec32a.zip |
Fix assertion regexps
`|' is a meta character, so needs to be escaped.
Diffstat (limited to 'test')
-rw-r--r-- | test/psych/test_string.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/psych/test_string.rb b/test/psych/test_string.rb index df8fb98..4718a47 100644 --- a/test/psych/test_string.rb +++ b/test/psych/test_string.rb @@ -68,7 +68,7 @@ module Psych def test_literal_when_inner_and_final_line_break str = "Lorem ipsum\ndolor\n" yaml = Psych.dump str, line_width: 12 - assert_match /---\s*|\n(.*\n){2}\Z/, yaml + assert_match /---\s*\|\n(.*\n){2}\Z/, yaml assert_equal str, Psych.load(yaml) end @@ -76,7 +76,7 @@ module Psych def test_literal_strip_when_inner_line_break_and_no_final_line_break str = "Lorem ipsum\ndolor" yaml = Psych.dump str, line_width: 12 - assert_match /---\s*|-\n(.*\n){2}\Z/, yaml + assert_match /---\s*\|-\n(.*\n){2}\Z/, yaml assert_equal str, Psych.load(yaml) end |