OLD | NEW |
1 // Copyright 2017 the V8 project authors. All rights reserved. | 1 // Copyright 2017 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // This tests that RegExp dotall features are not enabled when | 5 // This tests that RegExp dotall features are not enabled when |
6 // --harmony-regexp-dotall is not passed. | 6 // --harmony-regexp-dotall is not passed. |
7 | 7 |
| 8 // Flags: --no-harmony-regexp-dotall |
| 9 |
8 // Construction does not throw. | 10 // Construction does not throw. |
9 { | 11 { |
10 assertThrows("/./s", SyntaxError); | 12 assertThrows("/./s", SyntaxError); |
11 assertThrows(() => RegExp(".", "s"), SyntaxError); | 13 assertThrows(() => RegExp(".", "s"), SyntaxError); |
12 assertThrows(() => new RegExp(".", "s"), SyntaxError); | 14 assertThrows(() => new RegExp(".", "s"), SyntaxError); |
13 assertThrows(() => new RegExp(".", "wtf"), SyntaxError); | 15 assertThrows(() => new RegExp(".", "wtf"), SyntaxError); |
14 } | 16 } |
15 | 17 |
16 // The flags accessors. | 18 // The flags accessors. |
17 { | 19 { |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 assertTrue(re.test("\u0085")); | 62 assertTrue(re.test("\u0085")); |
61 assertTrue(re.test("\v")); | 63 assertTrue(re.test("\v")); |
62 assertTrue(re.test("\f")); | 64 assertTrue(re.test("\f")); |
63 assertTrue(re.test("\u180E")); | 65 assertTrue(re.test("\u180E")); |
64 assertTrue(re.test("\u{10300}")); // Supplementary plane. | 66 assertTrue(re.test("\u{10300}")); // Supplementary plane. |
65 assertFalse(re.test("\n")); | 67 assertFalse(re.test("\n")); |
66 assertFalse(re.test("\r")); | 68 assertFalse(re.test("\r")); |
67 assertFalse(re.test("\u2028")); | 69 assertFalse(re.test("\u2028")); |
68 assertFalse(re.test("\u2029")); | 70 assertFalse(re.test("\u2029")); |
69 } | 71 } |
OLD | NEW |