summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSHIBATA Hiroshi <hsbt@ruby-lang.org>2016-06-24 16:21:43 +0800
committerGitHub <noreply@github.com>2016-06-24 16:21:43 +0800
commit888f3c5c7268f7ffe5fa5af4295067fc12ca9fb6 (patch)
tree39237543fb2b643d936ad083f70ea6fe7deebe14 /test
parent1084fd32c039ba5760f444c2c016ec0d7163e19d (diff)
parentb737f0811a9687cf86f44f0a35f61cbde9eac673 (diff)
downloadpsych-888f3c5c7268f7ffe5fa5af4295067fc12ca9fb6.zip
Merge pull request #270 from tenderlove/issue-11988
Support YAML 1.2 Core Schema
Diffstat (limited to 'test')
-rw-r--r--test/psych/visitors/test_yaml_tree.rb6
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 b3890bc..5755f58 100644
--- a/test/psych/visitors/test_yaml_tree.rb
+++ b/test/psych/visitors/test_yaml_tree.rb
@@ -156,6 +156,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