007033109d
Some test files were included, where only their data actually depended on line endings. Some tests didn't actually depend on line ending at all. (They may date back to a time where multiline strings didn't normalize their newlines.) Fix some syntax tests that had been formatted, and exempt all files depending on line endings from formatting. Change-Id: I6c003e9c4f03d3b2af102bfca59d4a7bc8e6d63f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/434380 Reviewed-by: Devon Carew <devoncarew@google.com> Commit-Queue: Lasse Nielsen <lrn@google.com>
59 lines
1.1 KiB
Dart
59 lines
1.1 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.
|
|
|
|
import "package:expect/expect.dart";
|
|
|
|
void main() {
|
|
// Spaces after '''.
|
|
Expect.equals('foo', '''
|
|
foo''');
|
|
|
|
// Tab characters after '''.
|
|
Expect.equals('foo', '''
|
|
foo''');
|
|
|
|
Expect.equals('\\\nfoo', '''\\
|
|
foo''');
|
|
|
|
Expect.equals('\t\nfoo', '''\t
|
|
foo''');
|
|
|
|
// Backslash just before newline.
|
|
Expect.equals('foo', '''\
|
|
foo''');
|
|
|
|
// Backslash before space, tab and newline.
|
|
Expect.equals('foo', '''\ \ \
|
|
foo''');
|
|
|
|
Expect.equals(' \nfoo', '''\x20
|
|
foo''');
|
|
|
|
String x = ' ';
|
|
Expect.equals(' \nfoo', '''$x
|
|
foo''');
|
|
|
|
/// Spaces after '''.
|
|
Expect.equals('foo', r'''
|
|
foo''');
|
|
|
|
/// Tab characters after '''.
|
|
Expect.equals('foo', r'''
|
|
foo''');
|
|
|
|
Expect.equals('\\\\\nfoo', r'''\\
|
|
foo''');
|
|
|
|
Expect.equals('\\t\nfoo', r'''\t
|
|
foo''');
|
|
|
|
// Backslash before newline.
|
|
Expect.equals('foo', r'''\
|
|
foo''');
|
|
|
|
// Backslash before space, tab and newline.
|
|
Expect.equals('foo', r'''\ \ \
|
|
foo''');
|
|
}
|