summaryrefslogtreecommitdiff
path: root/test/psych
diff options
context:
space:
mode:
Diffstat (limited to 'test/psych')
-rw-r--r--test/psych/test_deprecated.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/psych/test_deprecated.rb b/test/psych/test_deprecated.rb
index f5ff79b56d0..c2c8a972c32 100644
--- a/test/psych/test_deprecated.rb
+++ b/test/psych/test_deprecated.rb
@@ -171,5 +171,15 @@ module Psych
assert_equal 'null', Psych.detect_implicit('')
assert_equal 'string', Psych.detect_implicit('foo')
end
+
+ def test_private_type
+ types = []
+ Psych.add_private_type('foo') { |*args| types << args }
+ Psych.load <<-eoyml
+- !x-private:foo bar
+ eoyml
+
+ assert_equal [["x-private:foo", "bar"]], types
+ end
end
end