brianwilkerson@google.com | cf4d11e | 2015-03-27 19:28:15 +0000 | [diff] [blame] | 1 | // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 2 | // for details. All rights reserved. Use of this source code is governed by a |
| 3 | // BSD-style license that can be found in the LICENSE file. |
| 4 | |
Stephan Herhut | 225be75 | 2015-06-26 14:40:01 +0200 | [diff] [blame] | 5 | // Note: This test relies on LF line endings in the source file. |
| 6 | |
brianwilkerson@google.com | cf4d11e | 2015-03-27 19:28:15 +0000 | [diff] [blame] | 7 | import "package:expect/expect.dart"; |
| 8 | |
| 9 | main() { |
| 10 | Expect.equals('foo', ''' |
| 11 | foo'''); |
| 12 | |
| 13 | Expect.equals('\\\nfoo', '''\\ |
| 14 | foo'''); |
| 15 | |
| 16 | Expect.equals('\t\nfoo', '''\t |
| 17 | foo'''); |
| 18 | |
| 19 | Expect.equals('foo', '''\ |
| 20 | foo'''); |
| 21 | |
| 22 | Expect.equals('foo', '''\ \ |
| 23 | foo'''); |
| 24 | |
| 25 | Expect.equals(' \nfoo', '''\x20 |
| 26 | foo'''); |
| 27 | |
| 28 | String x = ' '; |
| 29 | Expect.equals(' \nfoo', '''$x |
| 30 | foo'''); |
| 31 | |
| 32 | Expect.equals('foo', r''' |
| 33 | foo'''); |
| 34 | |
| 35 | Expect.equals('\\\\\nfoo', r'''\\ |
| 36 | foo'''); |
| 37 | |
| 38 | Expect.equals('\\t\nfoo', r'''\t |
| 39 | foo'''); |
| 40 | |
| 41 | Expect.equals('foo', r'''\ |
| 42 | foo'''); |
| 43 | |
| 44 | Expect.equals('foo', r'''\ \ |
| 45 | foo'''); |
| 46 | } |