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

Unified Diff: dart/tests/try/paste_content_rewriting_test.dart

Issue 373563002: Handle multiline interpolated strings in line-based scanner. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: getDecoration has side effects Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « dart/tests/language/string_interpolation_newline_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/tests/try/paste_content_rewriting_test.dart
diff --git a/dart/tests/try/paste_content_rewriting_test.dart b/dart/tests/try/paste_content_rewriting_test.dart
index 6583c75f06720c4db5aebce3553b7eec63dab6a8..1c7b2b2dfc0e1e3b340f07109c7068530c3b75e8 100644
--- a/dart/tests/try/paste_content_rewriting_test.dart
+++ b/dart/tests/try/paste_content_rewriting_test.dart
@@ -31,6 +31,15 @@ const Map<String, String> tests = const <String, String> {
'r"""\n\n\'"""': 'r"""\n\n\'"""',
'"': '<DIAGNOSTIC>"</DIAGNOSTIC>',
'/**\n*/': '/**\n*/',
+
+ // The following case tests that single line strings can span multiple lines
+ // via ${}. The string is constructed so that it is possible to tell if the
+ // line-bases scanner (incorrectly) reverses the order of the string quotes
+ // in its state string. The example string is a complicated way of writing:
+ // '[[{{}: {}}]]'. See also
+ // tests/language/string_interpolation_newline_test.dart.
+ '"\${ [ "\${ [ \'\${ { \'\${\n{\n} }\' : {\n} } }\' ] }" ] }"':
+ '"\${ [ "\${ [ \'\${ { \'\${\n{\n} }\' : {\n} } }\' ] }" ] }"',
};
List<Node> queryDiagnosticNodes() {
« no previous file with comments | « dart/tests/language/string_interpolation_newline_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698