blob: 565a59ab0a0600f271821f7d900fb482d85693b9 [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
Ben Murdoch61f157c2016-09-16 13:49:30 +01005// Flags: --harmony-regexp-property
Ben Murdochda12d292016-06-02 14:46:10 +01006
7function t(re, s) { assertTrue(re.test(s)); }
8function f(re, s) { assertFalse(re.test(s)); }
9
Ben Murdochc5610432016-08-08 18:44:38 +010010t(/\p{Script=Common}+/u, ".");
11f(/\p{Script=Common}+/u, "supercalifragilisticexpialidocious");
Ben Murdochda12d292016-06-02 14:46:10 +010012
Ben Murdochc5610432016-08-08 18:44:38 +010013t(/\p{Script=Han}+/u, "话说天下大势,分久必合,合久必分");
14t(/\p{Script=Hani}+/u, "吾庄后有一桃园,花开正盛");
15f(/\p{Script=Han}+/u, "おはようございます");
16f(/\p{Script=Hani}+/u, "Something is rotten in the state of Denmark");
Ben Murdochda12d292016-06-02 14:46:10 +010017
Ben Murdochc5610432016-08-08 18:44:38 +010018t(/\p{Script=Latin}+/u, "Wie froh bin ich, daß ich weg bin!");
19t(/\p{Script=Latn}+/u,
Ben Murdochda12d292016-06-02 14:46:10 +010020 "It was a bright day in April, and the clocks were striking thirteen");
Ben Murdochc5610432016-08-08 18:44:38 +010021f(/\p{Script=Latin}+/u, "奔腾千里荡尘埃,渡水登山紫雾开");
22f(/\p{Script=Latn}+/u, "いただきます");
Ben Murdochda12d292016-06-02 14:46:10 +010023
Ben Murdochc5610432016-08-08 18:44:38 +010024t(/\p{sc=Hiragana}/u, "いただきます");
25t(/\p{sc=Hira}/u, "ありがとうございました");
26f(/\p{sc=Hiragana}/u,
Ben Murdochda12d292016-06-02 14:46:10 +010027 "Als Gregor Samsa eines Morgens aus unruhigen Träumen erwachte");
Ben Murdochc5610432016-08-08 18:44:38 +010028f(/\p{sc=Hira}/u, "Call me Ishmael");
Ben Murdochda12d292016-06-02 14:46:10 +010029
Ben Murdochc5610432016-08-08 18:44:38 +010030t(/\p{sc=Phoenician}/u, "\u{10900}\u{1091a}");
31t(/\p{sc=Phnx}/u, "\u{1091f}\u{10916}");
32f(/\p{sc=Phoenician}/u, "Arthur est un perroquet");
33f(/\p{sc=Phnx}/u, "设心狠毒非良士,操卓原来一路人");
Ben Murdochda12d292016-06-02 14:46:10 +010034
Ben Murdochc5610432016-08-08 18:44:38 +010035t(/\p{sc=Grek}/u, "ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ");
36t(/\p{sc=Greek}/u, "μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος");
37f(/\p{sc=Greek}/u, "高贤未服英雄志,屈节偏生杰士疑");
38f(/\p{sc=Greek}/u,
Ben Murdochda12d292016-06-02 14:46:10 +010039 "Mr. Jones, of the Manor Farm, had locked the hen-houses for the night");