summaryrefslogtreecommitdiff
path: root/test/visitors/test_to_ruby.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/visitors/test_to_ruby.rb')
-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