blob: 8795014d32ef458ff48c5f7ba5e19ab1b1c57e68 [file] [log] [blame]
brianwilkerson@google.comcf4d11e2015-03-27 19:28:15 +00001// 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 Herhut225be752015-06-26 14:40:01 +02005// Note: This test relies on LF line endings in the source file.
6
brianwilkerson@google.comcf4d11e2015-03-27 19:28:15 +00007import "package:expect/expect.dart";
8
9main() {
10 Expect.equals('foo', '''
11foo''');
12
13 Expect.equals('\\\nfoo', '''\\
14foo''');
15
16 Expect.equals('\t\nfoo', '''\t
17foo''');
18
19 Expect.equals('foo', '''\
20foo''');
21
22 Expect.equals('foo', '''\ \
23foo''');
24
25 Expect.equals(' \nfoo', '''\x20
26foo''');
27
28 String x = ' ';
29 Expect.equals(' \nfoo', '''$x
30foo''');
31
32 Expect.equals('foo', r'''
33foo''');
34
35 Expect.equals('\\\\\nfoo', r'''\\
36foo''');
37
38 Expect.equals('\\t\nfoo', r'''\t
39foo''');
40
41 Expect.equals('foo', r'''\
42foo''');
43
44 Expect.equals('foo', r'''\ \
45foo''');
46}