summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2009-09-27 20:36:23 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2009-09-27 20:36:23 -0700
commit620ede3207d55689288ea08619f744975138736c (patch)
tree12ef45406eaa2db2c506460e2635db77dec0927e /test
parent4cb2ba04833af82a4618f2ebd03372bddc2047f5 (diff)
downloadpsych-620ede3207d55689288ea08619f744975138736c.zip
adding alias nodes
Diffstat (limited to 'test')
-rw-r--r--test/psych/test_tree_builder.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/psych/test_tree_builder.rb b/test/psych/test_tree_builder.rb
index 0b51a10..552caed 100644
--- a/test/psych/test_tree_builder.rb
+++ b/test/psych/test_tree_builder.rb
@@ -12,7 +12,7 @@ module Psych
bar : &A !!str baz,
boo : *A
}
-- baz
+- *A
eoyml
@tree = @parser.handler.root
end
@@ -65,5 +65,13 @@ module Psych
assert_instance_of Nodes::Mapping, map
end
+
+ def test_alias
+ doc = @tree.children.first
+ seq = doc.children.first
+ al = seq.children[2]
+ assert_instance_of Nodes::Alias, al
+ assert_equal 'A', al.anchor
+ end
end
end