Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 'dart:async'; | |
| 6 import 'package:async_helper/async_helper.dart'; | |
| 7 import 'package:expect/expect.dart'; | |
| 8 import 'compiler_helper.dart'; | |
| 9 | |
| 10 // Test that the compiler doesn't escape too many characters. | |
| 11 | |
| 12 Future<String> compileExpression(String expression) { | |
| 13 var source = "foo() { return $expression; }"; | |
| 14 return compile(source, entry: "foo"); | |
| 15 } | |
| 16 | |
| 17 Future runTest() { | |
| 18 return compileExpression("'Тест на Кирилица - great.\\nNext \"line\".'") | |
|
sra1
2015/02/17 20:03:53
Add $PS and $LS.
floitsch
2015/02/20 13:55:50
Done.
| |
| 19 .then((String generated) { | |
| 20 Expect.isTrue( | |
| 21 generated.contains(r'"Тест на Кирилица - great.\nNext \"line\"."') || | |
|
Johnni Winther
2015/02/17 14:19:46
Shouldn't it be '\\nNext' instead of '\nNext' ?
floitsch
2015/02/20 13:55:50
No. This string is a raw string.
| |
| 22 generated.contains("'Тест на Кирилица - great.\\nNext \"line\".'")); | |
| 23 }); | |
| 24 } | |
| 25 | |
| 26 main() { | |
| 27 asyncTest(runTest); | |
| 28 } | |
| OLD | NEW |