diff options
Diffstat (limited to 'test/psych/test_psych.rb')
-rw-r--r-- | test/psych/test_psych.rb | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/test/psych/test_psych.rb b/test/psych/test_psych.rb index eeadc864ef..e557feffb7 100644 --- a/test/psych/test_psych.rb +++ b/test/psych/test_psych.rb @@ -178,17 +178,17 @@ class TestPsych < Psych::TestCase def test_domain_types got = nil - Psych.add_domain_type 'foo.bar,2002', 'foo' do |type, val| + Psych.add_domain_type 'foo.bar/2002', 'foo' do |type, val| got = val end - Psych.load('--- !foo.bar,2002/foo hello') + Psych.load('--- !foo.bar/2002:foo hello') assert_equal 'hello', got - Psych.load("--- !foo.bar,2002/foo\n- hello\n- world") + Psych.load("--- !foo.bar/2002:foo\n- hello\n- world") assert_equal %w{ hello world }, got - Psych.load("--- !foo.bar,2002/foo\nhello: world") + Psych.load("--- !foo.bar/2002:foo\nhello: world") assert_equal({ 'hello' => 'world' }, got) end @@ -295,16 +295,13 @@ class TestPsych < Psych::TestCase types = [] appender = lambda { |*args| types << args } - Psych.add_builtin_type('foo', &appender) - Psych.add_domain_type('example.com,2002', 'foo', &appender) + Psych.add_domain_type('example.com:2002', 'foo', &appender) Psych.load <<-eoyml -- !tag:yaml.org,2002:foo bar -- !tag:example.com,2002:foo bar +- !tag:example.com:2002:foo bar eoyml assert_equal [ - ["tag:yaml.org,2002:foo", "bar"], - ["tag:example.com,2002:foo", "bar"] + ["tag:example.com:2002:foo", "bar"] ], types end |