diff options
author | SHIBATA Hiroshi <hsbt@ruby-lang.org> | 2016-02-09 21:06:39 +0900 |
---|---|---|
committer | SHIBATA Hiroshi <hsbt@ruby-lang.org> | 2016-02-09 21:06:39 +0900 |
commit | b737f0811a9687cf86f44f0a35f61cbde9eac673 (patch) | |
tree | ffc1ae6d2be36385cae5f1f469aa231be1bb9586 /test | |
parent | 8d3a63e7e8480d987a916d1ca46ece0d5e071c9d (diff) | |
download | psych-b737f0811a9687cf86f44f0a35f61cbde9eac673.zip |
Support YAML 1.2 Core Schema. Addressed https://bugs.ruby-lang.org/issues/11988
Diffstat (limited to 'test')
-rw-r--r-- | test/psych/visitors/test_yaml_tree.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/psych/visitors/test_yaml_tree.rb b/test/psych/visitors/test_yaml_tree.rb index 40702bc..b7116a5 100644 --- a/test/psych/visitors/test_yaml_tree.rb +++ b/test/psych/visitors/test_yaml_tree.rb @@ -155,6 +155,12 @@ module Psych assert_equal(-1, Psych.load(Psych.dump(-1 / 0.0)).infinite?) end + def test_string + assert_match(/'017'/, Psych.dump({'a' => '017'})) + assert_match(/'019'/, Psych.dump({'a' => '019'})) + assert_match(/'01818'/, Psych.dump({'a' => '01818'})) + end + # http://yaml.org/type/null.html def test_nil assert_cycle nil |