ruby-changes:15142
From: tenderlove <ko1@a...>
Date: Tue, 23 Mar 2010 05:19:24 +0900 (JST)
Subject: [ruby-changes:15142] Ruby:r27020 (trunk): * test/yaml/test_hash.rb (test_ref_append): adding a test for idref
tenderlove 2010-03-23 05:18:57 +0900 (Tue, 23 Mar 2010) New Revision: 27020 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=27020 Log: * test/yaml/test_hash.rb (test_ref_append): adding a test for idref append nodes. Modified files: trunk/test/yaml/test_hash.rb Index: test/yaml/test_hash.rb =================================================================== --- test/yaml/test_hash.rb (revision 27019) +++ test/yaml/test_hash.rb (revision 27020) @@ -14,5 +14,16 @@ 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/