summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2009-09-27 16:08:56 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2009-09-27 16:08:56 -0700
commitb3f313df01662174db059176a6159fda80e68166 (patch)
tree4b16158a90e7a6e70f4c3fce60ec95bcd0c42ecf /test
parente86f1a64f7e905442d331b242ad4fe60eafe49a6 (diff)
downloadpsych-b3f313df01662174db059176a6159fda80e68166.zip
testing tag and anchors
Diffstat (limited to 'test')
-rw-r--r--test/psych/test_parser.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/psych/test_parser.rb b/test/psych/test_parser.rb
index 7405374..fc377c8 100644
--- a/test/psych/test_parser.rb
+++ b/test/psych/test_parser.rb
@@ -24,6 +24,21 @@ module Psych
@parser = Psych::Parser.new EventCatcher.new
end
+ def test_mapping_tag
+ @parser.parse("---\n!!map { key: value }")
+ assert_called :start_mapping, ["tag:yaml.org,2002:map", false, FLOW_MAPPING_STYLE]
+ end
+
+ def test_mapping_anchor
+ @parser.parse("---\n&A { key: value }")
+ assert_called :start_mapping, ['A', true, FLOW_MAPPING_STYLE]
+ end
+
+ def test_mapping_block
+ @parser.parse("---\n key: value")
+ assert_called :start_mapping, [true, BLOCK_MAPPING_STYLE]
+ end
+
def test_mapping_start
@parser.parse("---\n{ key: value }")
assert_called :start_mapping