diff --git a/.gitattributes b/.gitattributes index 111564a5fcb..b6c4fac7a28 100644 --- a/.gitattributes +++ b/.gitattributes @@ -10,11 +10,16 @@ *.md text *.yaml text -# Windows files that should not be converted. -tests/lib/mirrors/method_mirror_source_line_ending_cr.dart -text -tests/lib/mirrors/method_mirror_source_line_ending_crlf.dart -text +# Files that should not be converted. tests/compiler/dart2js_extra/string_interpolation_test.dart -text tests/compiler/dart2js_extra/string_interpolation_dynamic_test.dart -text +tests/compiler/dart2js_extra/literal_string_juxtaposition_test.dart -text +tests/language/raw_string_test.dart -text +tests/language/multiline_strings_test.dart -text +tests/lib/convert/json_pretty_test.dart -text +tests/lib/mirrors/method_mirror_source_line_ending_cr.dart -text +tests/lib/mirrors/method_mirror_source_line_ending_crlf.dart -text +pkg/js_ast/test/printer_callback_test.dart -text # Files to leave alone and not diff. *.png binary diff --git a/pkg/js_ast/test/printer_callback_test.dart b/pkg/js_ast/test/printer_callback_test.dart index 1a1db3590db..b4ff074256c 100644 --- a/pkg/js_ast/test/printer_callback_test.dart +++ b/pkg/js_ast/test/printer_callback_test.dart @@ -2,6 +2,8 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. +// Note: This test relies on LF line endings in the source file. + // Test that JS printer callbacks occur when expected. library js_ast.printer.callback_test; diff --git a/tests/compiler/dart2js_extra/literal_string_juxtaposition_test.dart b/tests/compiler/dart2js_extra/literal_string_juxtaposition_test.dart index 03d4725a117..60702c43c97 100644 --- a/tests/compiler/dart2js_extra/literal_string_juxtaposition_test.dart +++ b/tests/compiler/dart2js_extra/literal_string_juxtaposition_test.dart @@ -2,6 +2,8 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. +// Note: This test relies on LF line endings in the source file. + import "package:expect/expect.dart"; main() { diff --git a/tests/compiler/dart2js_extra/string_interpolation_dynamic_test.dart b/tests/compiler/dart2js_extra/string_interpolation_dynamic_test.dart index 14ff9a5370d..461bcfea6a4 100644 --- a/tests/compiler/dart2js_extra/string_interpolation_dynamic_test.dart +++ b/tests/compiler/dart2js_extra/string_interpolation_dynamic_test.dart @@ -2,6 +2,8 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. +// Note: This test relies on LF line endings in the source file. + import "package:expect/expect.dart"; import 'dart:math'; diff --git a/tests/compiler/dart2js_extra/string_interpolation_test.dart b/tests/compiler/dart2js_extra/string_interpolation_test.dart index 7552214ab21..b8350e10cd0 100644 --- a/tests/compiler/dart2js_extra/string_interpolation_test.dart +++ b/tests/compiler/dart2js_extra/string_interpolation_test.dart @@ -2,6 +2,8 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. +// Note: This test relies on LF line endings in the source file. + import "package:expect/expect.dart"; // Test that String interpolation works in the code generated by the leg diff --git a/tests/html/svgelement_test.dart b/tests/html/svgelement_test.dart index 2b573ca97cc..ebef7ab86ef 100644 --- a/tests/html/svgelement_test.dart +++ b/tests/html/svgelement_test.dart @@ -52,7 +52,9 @@ main() { 'xmlns="http://www.w3.org/2000/svg" />')); expect(el.outerHtml, anyOf(svgContent, '\n ' - '\n \n')); + '\n \n', + '\r\n ' + '\r\n \r\n')); }); test('has no parent', () => diff --git a/tests/language/multiline_strings_test.dart b/tests/language/multiline_strings_test.dart index d7f8f3e5d03..8795014d32e 100644 --- a/tests/language/multiline_strings_test.dart +++ b/tests/language/multiline_strings_test.dart @@ -2,6 +2,8 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. +// Note: This test relies on LF line endings in the source file. + import "package:expect/expect.dart"; main() { diff --git a/tests/language/raw_string_test.dart b/tests/language/raw_string_test.dart index ee5365bc682..b577747851f 100644 --- a/tests/language/raw_string_test.dart +++ b/tests/language/raw_string_test.dart @@ -2,6 +2,8 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. +// Note: This test relies on LF line endings in the source file. + import "package:expect/expect.dart"; class RawStringTest { diff --git a/tests/lib/convert/json_pretty_test.dart b/tests/lib/convert/json_pretty_test.dart index a0c3bc61e35..62380525aca 100644 --- a/tests/lib/convert/json_pretty_test.dart +++ b/tests/lib/convert/json_pretty_test.dart @@ -2,6 +2,8 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. +// Note: This test relies on LF line endings in the source file. + library json_pretty_test; import 'dart:convert'; diff --git a/tests/lib/convert/utf84_test.dart b/tests/lib/convert/utf84_test.dart index 37f0e2c72dd..ddd1dc98448 100755 --- a/tests/lib/convert/utf84_test.dart +++ b/tests/lib/convert/utf84_test.dart @@ -87,9 +87,8 @@ const List testGreekUtf8 = const[ 0xbd, 0xb6, 0x20, 0xce, 0xbe, 0xce, 0xad, 0xcf, 0x86, 0xcf, 0x89, 0xcf, 0x84, 0xce, 0xbf]; -const String testKatakanaPhrase = """ -イロハニホヘト チリヌルヲ ワカヨタレソ ツネナラム -ウヰノオクヤマ ケフコエテ アサキユメミシ ヱヒモセスン"""; +const String testKatakanaPhrase = "イロハニホヘト チリヌルヲ ワカヨタレソ " + "ツネナラム ウヰノオクヤマ ケフコエテ アサキユメミシ ヱヒモセスン"; const List testKatakanaUtf8 = const[ 0xe3, 0x82, 0xa4, 0xe3, 0x83, 0xad, 0xe3, 0x83, @@ -101,7 +100,7 @@ const List testKatakanaUtf8 = const[ 0x82, 0xbf, 0xe3, 0x83, 0xac, 0xe3, 0x82, 0xbd, 0x20, 0xe3, 0x83, 0x84, 0xe3, 0x83, 0x8d, 0xe3, 0x83, 0x8a, 0xe3, 0x83, 0xa9, 0xe3, 0x83, 0xa0, - 0x0a, 0xe3, 0x82, 0xa6, 0xe3, 0x83, 0xb0, 0xe3, + 0x20, 0xe3, 0x82, 0xa6, 0xe3, 0x83, 0xb0, 0xe3, 0x83, 0x8e, 0xe3, 0x82, 0xaa, 0xe3, 0x82, 0xaf, 0xe3, 0x83, 0xa4, 0xe3, 0x83, 0x9e, 0x20, 0xe3, 0x82, 0xb1, 0xe3, 0x83, 0x95, 0xe3, 0x82, 0xb3, diff --git a/tests/lib/mirrors/method_mirror_source_line_ending_cr.dart b/tests/lib/mirrors/method_mirror_source_line_ending_cr.dart index 851c04cf86c..45533d47348 100755 --- a/tests/lib/mirrors/method_mirror_source_line_ending_cr.dart +++ b/tests/lib/mirrors/method_mirror_source_line_ending_cr.dart @@ -1 +1 @@ -// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // This file is marked executable so source control will preserve the type of // line ending. library line_endings.cr; oneLineCR(x) => x; multiLineCR(y) { return y + 1; } b (){ } \ No newline at end of file +// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // Note: This test relies on CR line endings in the source file. library line_endings.cr; oneLineCR(x) => x; multiLineCR(y) { return y + 1; } b (){ } diff --git a/tests/lib/mirrors/method_mirror_source_line_ending_crlf.dart b/tests/lib/mirrors/method_mirror_source_line_ending_crlf.dart index bcf3e64c1f2..d93615cd83b 100755 --- a/tests/lib/mirrors/method_mirror_source_line_ending_crlf.dart +++ b/tests/lib/mirrors/method_mirror_source_line_ending_crlf.dart @@ -2,8 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -// This file is marked executable so source control will preserve the type of -// line ending. +// Note: This test relies on CRLF line endings in the source file. library line_endings.crlf;