diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2009-09-28 15:44:37 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2009-09-28 15:44:37 -0700 |
commit | cbf2a14ec5fc5b6fe0b576c2df13cf5e29cefbb3 (patch) | |
tree | dbfe4b8deff9869c9f5fdc714825fd414a821f2e /test/visitors/test_to_ruby.rb | |
parent | c48e3e528685d6127193de67721b2707c0675936 (diff) | |
download | psych-cbf2a14ec5fc5b6fe0b576c2df13cf5e29cefbb3.zip |
aliases starting to work
Diffstat (limited to 'test/visitors/test_to_ruby.rb')
-rw-r--r-- | test/visitors/test_to_ruby.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/visitors/test_to_ruby.rb b/test/visitors/test_to_ruby.rb index c7caf47..cc499b7 100644 --- a/test/visitors/test_to_ruby.rb +++ b/test/visitors/test_to_ruby.rb @@ -48,6 +48,16 @@ module Psych assert_equal %w{ foo bar }, stream.to_ruby end + + def test_alias + seq = Nodes::Sequence.new + seq.children << Nodes::Scalar.new('foo', 'A') + seq.children << Nodes::Alias.new('A') + + list = seq.to_ruby + assert_equal %w{ foo foo }, list + assert_equal list[0].object_id, list[1].object_id + end end end end |