From 5ffa4a8bdb7e541a6cfa0e26d634ca3a7adc1339 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Thu, 8 Oct 2009 22:50:50 -0700 Subject: updating yaml test --- test/yaml/test_yaml.rb | 81 ++++++++++++++++++++++++++++---------------------- 1 file changed, 45 insertions(+), 36 deletions(-) (limited to 'test/yaml') diff --git a/test/yaml/test_yaml.rb b/test/yaml/test_yaml.rb index b8ddd12..bdc83aa 100644 --- a/test/yaml/test_yaml.rb +++ b/test/yaml/test_yaml.rb @@ -716,23 +716,32 @@ EOY assert_equal( doc_ct, 2 ) end - def test_spec_url_escaping - YAML.add_domain_type( "domain.tld,2002", "type0" ) { |type, val| - "ONE: #{val}" - } - YAML.add_domain_type( "domain.tld,2002", "type%30" ) { |type, val| - "TWO: #{val}" - } - assert_parse_only( - { 'same' => [ 'ONE: value', 'ONE: value' ], 'different' => [ 'TWO: value' ] }, < [ 'ONE: value', 'ONE: value' ], 'different' => [ 'TWO: value' ] }, < 2, :UseVersion => 0 ) - y.add( - { 'hi' => 'hello', 'map' => - { 'good' => 'two' }, - 'time' => Time.now, - 'try' => /^po(.*)$/, - 'bye' => 'goodbye' - } - ) - y.add( { 'po' => 'nil', 'oper' => 90 } ) - y.add( { 'hi' => 'wow!', 'bye' => 'wow!' } ) - y.add( { [ 'Red Socks', 'Boston' ] => [ 'One', 'Two', 'Three' ] } ) - y.add( [ true, false, false ] ) - end + ## + ## Test the YAML::Stream class -- INACTIVE at the moment + ## + #def test_document + # y = YAML::Stream.new( :Indent => 2, :UseVersion => 0 ) + # y.add( + # { 'hi' => 'hello', 'map' => + # { 'good' => 'two' }, + # 'time' => Time.now, + # 'try' => /^po(.*)$/, + # 'bye' => 'goodbye' + # } + # ) + # y.add( { 'po' => 'nil', 'oper' => 90 } ) + # y.add( { 'hi' => 'wow!', 'bye' => 'wow!' } ) + # y.add( { [ 'Red Socks', 'Boston' ] => [ 'One', 'Two', 'Three' ] } ) + # y.add( [ true, false, false ] ) + #end # # Test YPath choices parsing @@ -1215,7 +1224,7 @@ EOY # # From Minero Aoki [ruby-core:2305] # - require 'yaml' + #require 'yaml' t = Time.now t = Time.at(t.tv_sec, t.tv_usec) 5.times do -- cgit v1.2.3