Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(269)

Side by Side Diff: tests/language/multiline_strings_test.dart

Issue 1042523004: Add a test for trimming leading whitespace in multiline strings (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/language/language.status ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
5 import "package:expect/expect.dart";
6
7 main() {
8 Expect.equals('foo', '''
9 foo''');
10
11 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.
12 foo''');
13
14 Expect.equals('\t\nfoo', '''\t
15 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
16
17 Expect.equals('foo', '''\
18 foo''');
19
20 Expect.equals('foo', '''\ \
21 foo''');
22
23 Expect.equals(' \nfoo', '''\x20
24 foo''');
25
26 String x = ' ';
27 Expect.equals(' \nfoo', '''$x
28 foo''');
29
30 Expect.equals('foo', r'''
31 foo''');
32
33 Expect.equals('\\\\\nfoo', r'''\\
34 foo''');
35
36 Expect.equals('\\t\nfoo', r'''\t
37 foo''');
38
39 Expect.equals('foo', r'''\
40 foo''');
41
42 Expect.equals('foo', r'''\ \
43 foo''');
44 }
OLDNEW
« no previous file with comments | « tests/language/language.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698