diff options
author | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-03-22 20:18:57 +0000 |
---|---|---|
committer | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-03-22 20:18:57 +0000 |
commit | 094d03c5d3bbbd9a68ff4f0d86bd988e29773da1 (patch) | |
tree | c76994ccd5f2f3c240897e4a943e9052b7ab404b /test/yaml | |
parent | 0899c59b4b8e5a23dbd36a9b72e001425085288a (diff) | |
download | ruby-094d03c5d3bbbd9a68ff4f0d86bd988e29773da1.tar.gz |
* test/yaml/test_hash.rb (test_ref_append): adding a test for idref
append nodes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/yaml')
-rw-r--r-- | test/yaml/test_hash.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/yaml/test_hash.rb b/test/yaml/test_hash.rb index afcdcaca7b..18a7e2533a 100644 --- a/test/yaml/test_hash.rb +++ b/test/yaml/test_hash.rb @@ -14,5 +14,16 @@ module YAML def test_dump assert_equal @hash, YAML.load(YAML.dump(@hash)) end + + def test_ref_append + hash = YAML.load(<<-eoyml) +--- +foo: &foo + hello: world +bar: + <<: *foo +eoyml + assert_equal({"foo"=>{"hello"=>"world"}, "bar"=>{"hello"=>"world"}}, hash) + end end end |