Project

General

Profile

Bug #1311 ยป test_yaml.patch

all tests pass - daz (Dave B), 03/25/2009 09:54 PM

View differences:

test_yaml.rb (working copy)
427 427
		)
428 428
	end
429 429

  
430
	#
431
	# Reports from N.Easterly & J.Trupiano : Tests with patch from daz
432
	# [ruby-core:23006] [Bug #1311] http://redmine.ruby-lang.org/issues/show/1311
433
	#
434
	def test_scan_scalar_nl
435
		assert_cycle(<<EoY)
436

  
437
 a
438
b
439
EoY
440
		assert_cycle(<<EoY)
441

  
442
 a
443
  b
444
c
445
EoY
446
		assert_cycle(<<EoY)
447

  
448
  a
449
 b
450
EoY
451
		assert_cycle("  Do I work?\nNo indent")
452
		assert_cycle("  \n  Do I work?\nNo indent")
453
		assert_cycle("\n  Do I work?\nNo indent")
454
	end
455

  
430 456
	def test_spec_multiline_scalars
431 457
		# Multiline flow scalars
432 458
	 	assert_parse_only(
......
1316 1342
    end
1317 1343
end
1318 1344

  
1319
if $0 == __FILE__
1320
  suite = Test::Unit::TestSuite.new('YAML')
1321
  ObjectSpace.each_object(Class) do |klass|
1322
    suite << klass.suite if (Test::Unit::TestCase > klass)
1323
  end
1324
  require 'test/unit/ui/console/testrunner'
1325
  Test::Unit::UI::Console::TestRunner.run(suite).passed?
1326
end
1345
#~ if $0 == __FILE__
1346
  #~ suite = Test::Unit::TestSuite.new('YAML')
1347
  #~ ObjectSpace.each_object(Class) do |klass|
1348
    #~ suite << klass.suite if (Test::Unit::TestCase > klass)
1349
  #~ end
1350
  #~ require 'test/unit/ui/console/testrunner'
1351
  #~ Test::Unit::UI::Console::TestRunner.run(suite).passed?
1352
#~ end