test/data_sources/test_filesystem.rb in nanoc-3.7.1 vs test/data_sources/test_filesystem.rb in nanoc-3.7.2

- old
+ new

@@ -314,55 +314,55 @@ # Create a file File.open('test.html', 'w') do |io| io.write "-----\n" io.write "foo: bar\n" io.write "-----\n" - io.write "blah blah\n" + io.write " \t\n blah blah\n" end # Create data source data_source = Nanoc::DataSources::FilesystemCombined.new(nil, nil, nil, nil) # Parse it result = data_source.instance_eval { parse('test.html', nil, 'foobar') } assert_equal({ 'foo' => 'bar' }, result[0]) - assert_equal('blah blah', result[1]) + assert_equal(" \t\n blah blah\n", result[1]) end def test_parse_embedded_with_extra_spaces # Create a file File.open('test.html', 'w') do |io| io.write "----- \n" io.write "foo: bar\n" io.write "-----\t\t\t\t\t\n" - io.write "blah blah\n" + io.write " blah blah\n" end # Create data source data_source = Nanoc::DataSources::FilesystemCombined.new(nil, nil, nil, nil) # Parse it result = data_source.instance_eval { parse('test.html', nil, 'foobar') } assert_equal({ 'foo' => 'bar' }, result[0]) - assert_equal('blah blah', result[1]) + assert_equal(" blah blah\n", result[1]) end def test_parse_embedded_empty_meta # Create a file File.open('test.html', 'w') do |io| io.write "-----\n" io.write "-----\n" - io.write "blah blah\n" + io.write "\nblah blah\n" end # Create data source data_source = Nanoc::DataSources::FilesystemCombined.new(nil, nil, nil, nil) # Parse it result = data_source.instance_eval { parse('test.html', nil, 'foobar') } assert_equal({}, result[0]) - assert_equal('blah blah', result[1]) + assert_equal("\nblah blah\n", result[1]) end def test_parse_utf8_bom File.open('test.html', 'w') do |io| io.write [ 0xEF, 0xBB, 0xBF ].map { |i| i.chr }.join @@ -374,10 +374,10 @@ data_source = Nanoc::DataSources::FilesystemCombined.new(nil, nil, nil, :encoding => 'utf-8') result = data_source.instance_eval { parse('test.html', nil, 'foobar') } assert_equal({ 'utf8bomawareness' => 'high' }, result[0]) - assert_equal('content goes here', result[1]) + assert_equal("content goes here\n", result[1]) end def test_parse_embedded_no_meta content = "blah\n" \ "blah blah blah\n" \