OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 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 | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 // Test that `null` is interpreted as `false` when passed as argument to | 5 // Test that `null` is interpreted as `false` when passed as argument to |
6 // `caseSensitive` and `multiLine`. | 6 // `caseSensitive` and `multiLine`. |
7 | 7 |
8 import 'package:expect/expect.dart'; | 8 import 'package:expect/expect.dart'; |
9 | 9 |
10 main() { | 10 main() { |
(...skipping 15 matching lines...) Expand all Loading... |
26 testMultiLine() { | 26 testMultiLine() { |
27 var r1 = new RegExp(r'^foo$'); | 27 var r1 = new RegExp(r'^foo$'); |
28 var r2 = new RegExp(r'^foo$', multiLine: true); | 28 var r2 = new RegExp(r'^foo$', multiLine: true); |
29 var r3 = new RegExp(r'^foo$', multiLine: false); | 29 var r3 = new RegExp(r'^foo$', multiLine: false); |
30 var r4 = new RegExp(r'^foo$', multiLine: null); | 30 var r4 = new RegExp(r'^foo$', multiLine: null); |
31 Expect.isNull(r1.firstMatch('\nfoo\n'), "r1.firstMatch('\\nfoo\\n')"); | 31 Expect.isNull(r1.firstMatch('\nfoo\n'), "r1.firstMatch('\\nfoo\\n')"); |
32 Expect.isNotNull(r2.firstMatch('\nfoo\n'), "r2.firstMatch('\\nfoo\\n')"); | 32 Expect.isNotNull(r2.firstMatch('\nfoo\n'), "r2.firstMatch('\\nfoo\\n')"); |
33 Expect.isNull(r3.firstMatch('\nfoo\n'), "r3.firstMatch('\\nfoo\\n')"); | 33 Expect.isNull(r3.firstMatch('\nfoo\n'), "r3.firstMatch('\\nfoo\\n')"); |
34 Expect.isNull(r4.firstMatch('\nfoo\n'), "r4.firstMatch('\\nfoo\\n')"); | 34 Expect.isNull(r4.firstMatch('\nfoo\n'), "r4.firstMatch('\\nfoo\\n')"); |
35 } | 35 } |
OLD | NEW |