summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2009-09-28 15:44:37 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2009-09-28 15:44:37 -0700
commitcbf2a14ec5fc5b6fe0b576c2df13cf5e29cefbb3 (patch)
treedbfe4b8deff9869c9f5fdc714825fd414a821f2e /test
parentc48e3e528685d6127193de67721b2707c0675936 (diff)
downloadpsych-cbf2a14ec5fc5b6fe0b576c2df13cf5e29cefbb3.zip
aliases starting to work
Diffstat (limited to 'test')
-rw-r--r--test/visitors/test_to_ruby.rb10
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