Bug #1311 » test_yaml.patch
test_yaml.rb (working copy) | ||
---|---|---|
)
|
||
end
|
||
#
|
||
# Reports from N.Easterly & J.Trupiano : Tests with patch from daz
|
||
# [ruby-core:23006] [Bug #1311] http://redmine.ruby-lang.org/issues/show/1311
|
||
#
|
||
def test_scan_scalar_nl
|
||
assert_cycle(<<EoY)
|
||
a
|
||
b
|
||
EoY
|
||
assert_cycle(<<EoY)
|
||
a
|
||
b
|
||
c
|
||
EoY
|
||
assert_cycle(<<EoY)
|
||
a
|
||
b
|
||
EoY
|
||
assert_cycle(" Do I work?\nNo indent")
|
||
assert_cycle(" \n Do I work?\nNo indent")
|
||
assert_cycle("\n Do I work?\nNo indent")
|
||
end
|
||
def test_spec_multiline_scalars
|
||
# Multiline flow scalars
|
||
assert_parse_only(
|
||
... | ... | |
end
|
||
end
|
||
if $0 == __FILE__
|
||
suite = Test::Unit::TestSuite.new('YAML')
|
||
ObjectSpace.each_object(Class) do |klass|
|
||
suite << klass.suite if (Test::Unit::TestCase > klass)
|
||
end
|
||
require 'test/unit/ui/console/testrunner'
|
||
Test::Unit::UI::Console::TestRunner.run(suite).passed?
|
||
end
|
||
#~ if $0 == __FILE__
|
||
#~ suite = Test::Unit::TestSuite.new('YAML')
|
||
#~ ObjectSpace.each_object(Class) do |klass|
|
||
#~ suite << klass.suite if (Test::Unit::TestCase > klass)
|
||
#~ end
|
||
#~ require 'test/unit/ui/console/testrunner'
|
||
#~ Test::Unit::UI::Console::TestRunner.run(suite).passed?
|
||
#~ end
|