blob: 19b50ee7dbc28a1193e96aea2f8011a1e6d9aec4 [file] [log] [blame]
Ben Murdochda12d292016-06-02 14:46:10 +01001// Copyright 2016 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// Flags: --harmony-regexp-property --harmony-unicode-regexps
6
7function t(re, s) { assertTrue(re.test(s)); }
8function f(re, s) { assertFalse(re.test(s)); }
9
10t(/\p{Common}+/u, ".");
11f(/\p{Common}+/u, "supercalifragilisticexpialidocious");
12
13t(/\p{Han}+/u, "话说天下大势,分久必合,合久必分");
14t(/\p{Hani}+/u, "吾庄后有一桃园,花开正盛");
15f(/\p{Han}+/u, "おはようございます");
16f(/\p{Hani}+/u, "Something is rotten in the state of Denmark");
17
18t(/\p{Latin}+/u, "Wie froh bin ich, daß ich weg bin!");
19t(/\p{Latn}+/u,
20 "It was a bright day in April, and the clocks were striking thirteen");
21f(/\p{Latin}+/u, "奔腾千里荡尘埃,渡水登山紫雾开");
22f(/\p{Latn}+/u, "いただきます");
23
24t(/\p{Hiragana}/u, "いただきます");
25t(/\p{Hira}/u, "ありがとうございました");
26f(/\p{Hiragana}/u,
27 "Als Gregor Samsa eines Morgens aus unruhigen Träumen erwachte");
28f(/\p{Hira}/u, "Call me Ishmael");
29
30t(/\p{Phoenician}/u, "\u{10900}\u{1091a}");
31t(/\p{Phnx}/u, "\u{1091f}\u{10916}");
32f(/\p{Phoenician}/u, "Arthur est un perroquet");
33f(/\p{Phnx}/u, "设心狠毒非良士,操卓原来一路人");
34
35t(/\p{Grek}/u, "ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ");
36t(/\p{Greek}/u, "μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος");
37f(/\p{Greek}/u, "高贤未服英雄志,屈节偏生杰士疑");
38f(/\p{Greek}/u,
39 "Mr. Jones, of the Manor Farm, had locked the hen-houses for the night");