Chromium Code Reviews| Index: tests/language/multiline_strings_test.dart |
| diff --git a/tests/language/multiline_strings_test.dart b/tests/language/multiline_strings_test.dart |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..d7f8f3e5d03946957477ef8ab7530f3e2aabc603 |
| --- /dev/null |
| +++ b/tests/language/multiline_strings_test.dart |
| @@ -0,0 +1,44 @@ |
| +// 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"; |
| + |
| +main() { |
| + Expect.equals('foo', ''' |
| +foo'''); |
| + |
| + Expect.equals('\\\nfoo', '''\\ |
|
hausner
2015/03/31 22:15:36
I believe this expectation is wrong. The Spec esse
hausner
2015/03/31 22:33:04
My bad. This expectation is right.
|
| +foo'''); |
| + |
| + Expect.equals('\t\nfoo', '''\t |
| +foo'''); |
|
hausner
2015/03/31 22:33:04
This multiline string should be equal to 'foo', si
Paul Berry
2015/03/31 23:33:03
The relevant spec text is: "If the first line of a
gbracha
2015/04/02 19:25:57
The idea was (I believe) to ignore invisible stuff
|
| + |
| + 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'''); |
| +} |