summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2009-09-30 15:00:01 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2009-09-30 15:00:01 -0700
commitcace67f720786328ba94009195b85945244962db (patch)
tree3db684052e76c64fe1955c61ed423b8b9e96e4a6 /test
parent0fdc41a6e3ab790e58db0e0f54affe5d2a8277f2 (diff)
downloadpsych-cace67f720786328ba94009195b85945244962db.zip
round tripping circular references
Diffstat (limited to 'test')
-rw-r--r--test/visitors/test_yast_builder.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/visitors/test_yast_builder.rb b/test/visitors/test_yast_builder.rb
index 2832da9..e70713c 100644
--- a/test/visitors/test_yast_builder.rb
+++ b/test/visitors/test_yast_builder.rb
@@ -8,6 +8,12 @@ module Psych
@v = Visitors::YASTBuilder.new
end
+ def test_circular_list
+ a = []
+ 2.times { a << a }
+ assert_equal a.inspect, Psych.load(a.to_yaml).inspect
+ end
+
def test_scalar
assert_round_trip 'foo'
assert_round_trip ':foo'