diff options
author | Yusuke Endoh <mame@ruby-lang.org> | 2021-05-17 14:22:42 +0900 |
---|---|---|
committer | Yusuke Endoh <mame@ruby-lang.org> | 2021-05-17 14:26:54 +0900 |
commit | c27c4a02210ddb494930e6361b311c5dfe621838 (patch) | |
tree | 380293c56f059c483ee163d03dd92b9aee7753ae | |
parent | ffa2791c5b5f689611f0464eff509af50fc09da9 (diff) | |
download | psych-c27c4a02210ddb494930e6361b311c5dfe621838.zip |
Make the test pass with the old libyaml
I have no idea what result is right, but it fails with libyaml 0.1.7
(bundled with Ubuntu 18.04) anyway.
-rw-r--r-- | test/psych/test_coder.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/psych/test_coder.rb b/test/psych/test_coder.rb index 1c14459..f6840ab 100644 --- a/test/psych/test_coder.rb +++ b/test/psych/test_coder.rb @@ -274,7 +274,7 @@ module Psych def test_coder_style_scalar_default foo = Psych.dump 'some scalar' - assert_equal "--- some scalar\n", foo + assert_match /\A--- some scalar\n(?:\.\.\.\n)?\z/, foo end def test_coder_style_scalar_any @@ -282,7 +282,7 @@ module Psych scalar: 'some scalar', style: Psych::Nodes::Scalar::ANY, tag: nil - assert_equal "--- some scalar\n", foo + assert_match /\A--- some scalar\n(?:\.\.\.\n)?\z/, foo end def test_coder_style_scalar_plain @@ -290,7 +290,7 @@ module Psych scalar: 'some scalar', style: Psych::Nodes::Scalar::PLAIN, tag: nil - assert_equal "--- some scalar\n", foo + assert_match /\A--- some scalar\n(?:\.\.\.\n)?\z/, foo end def test_coder_style_scalar_single_quoted |