mirror of
https://github.com/dart-lang/sdk
synced 2024-09-19 21:21:41 +00:00
Replace bad_raw_string_negative_test with a multitest
BUG=https://github.com/dart-lang/sdk/issues/28664 R=sigmund@google.com Review-Url: https://codereview.chromium.org/2687533003 .
This commit is contained in:
parent
b2d6de619e
commit
25e97c6082
|
@ -1,9 +0,0 @@
|
|||
// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
main() {
|
||||
// Raw String may not contain newline (may not be multi-line).
|
||||
print(r'
|
||||
');
|
||||
}
|
23
tests/language/bad_raw_string_test.dart
Normal file
23
tests/language/bad_raw_string_test.dart
Normal file
|
@ -0,0 +1,23 @@
|
|||
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
main() {
|
||||
// Raw String may not contain newline (may not be multi-line).
|
||||
String x = ''
|
||||
r' /// 01: compile-time error
|
||||
' /// 01: continued
|
||||
r" /// 02: compile-time error
|
||||
" /// 02: continued
|
||||
// Test that a raw string containing just one character, a \n char, fails.
|
||||
// Enclose the test string in a bigger multiline string, except in case 03:
|
||||
''' /// 03: compile-time error
|
||||
"""
|
||||
''' /// 03: continued
|
||||
r'
|
||||
'
|
||||
''' /// 03: continued
|
||||
"""
|
||||
''' /// 03: continued
|
||||
;
|
||||
}
|
|
@ -502,3 +502,6 @@ regress_27572_test: StaticWarning # Warning about undefined method expected.
|
|||
|
||||
[ $compiler == dart2analyzer && $builder_tag == strong ]
|
||||
*: Skip # Issue 28649
|
||||
|
||||
[ $compiler == dart2analyzer && $system != windows ]
|
||||
bad_raw_string_test/03: MissingCompileTimeError # Issue 28664
|
||||
|
|
Loading…
Reference in a new issue