diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2009-09-30 15:00:01 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2009-09-30 15:00:01 -0700 |
commit | cace67f720786328ba94009195b85945244962db (patch) | |
tree | 3db684052e76c64fe1955c61ed423b8b9e96e4a6 /test | |
parent | 0fdc41a6e3ab790e58db0e0f54affe5d2a8277f2 (diff) | |
download | psych-cace67f720786328ba94009195b85945244962db.zip |
round tripping circular references
Diffstat (limited to 'test')
-rw-r--r-- | test/visitors/test_yast_builder.rb | 6 |
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' |