051f0f1267
Also updated the tests so that we don't forget in the future. Change-Id: I0a998af306a0b6fa54b3c86cf164fdfe1f76340d Reviewed-on: https://dart-review.googlesource.com/3624 Reviewed-by: William Hesse <whesse@google.com>
72 lines
1.0 KiB
Dart
72 lines
1.0 KiB
Dart
// Copyright (c) 2015, 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 LF line endings in the source file.
|
|
// It requires an entry in the .gitattributes file.
|
|
|
|
import "package:expect/expect.dart";
|
|
|
|
main() {
|
|
Expect.equals(
|
|
'foo',
|
|
'''
|
|
foo''');
|
|
|
|
Expect.equals(
|
|
'\\\nfoo',
|
|
'''\\
|
|
foo''');
|
|
|
|
Expect.equals(
|
|
'\t\nfoo',
|
|
'''\t
|
|
foo''');
|
|
|
|
Expect.equals(
|
|
'foo',
|
|
'''\
|
|
foo''');
|
|
|
|
Expect.equals(
|
|
'foo',
|
|
'''\ \
|
|
foo''');
|
|
|
|
Expect.equals(
|
|
' \nfoo',
|
|
'''\x20
|
|
foo''');
|
|
|
|
String x = ' ';
|
|
Expect.equals(
|
|
' \nfoo',
|
|
'''$x
|
|
foo''');
|
|
|
|
Expect.equals(
|
|
'foo',
|
|
r'''
|
|
foo''');
|
|
|
|
Expect.equals(
|
|
'\\\\\nfoo',
|
|
r'''\\
|
|
foo''');
|
|
|
|
Expect.equals(
|
|
'\\t\nfoo',
|
|
r'''\t
|
|
foo''');
|
|
|
|
Expect.equals(
|
|
'foo',
|
|
r'''\
|
|
foo''');
|
|
|
|
Expect.equals(
|
|
'foo',
|
|
r'''\ \
|
|
foo''');
|
|
}
|