summaryrefslogtreecommitdiff
path: root/deps/v8/test/intl/enumeration/callendar-syntax-valid.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/test/intl/enumeration/callendar-syntax-valid.js')
-rw-r--r--deps/v8/test/intl/enumeration/callendar-syntax-valid.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/deps/v8/test/intl/enumeration/callendar-syntax-valid.js b/deps/v8/test/intl/enumeration/callendar-syntax-valid.js
new file mode 100644
index 0000000000..881c7e603c
--- /dev/null
+++ b/deps/v8/test/intl/enumeration/callendar-syntax-valid.js
@@ -0,0 +1,14 @@
+// Copyright 2021 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony_intl_enumeration
+
+// Test the return items of calendar fit 'type'
+let regex = /^[a-zA-Z0-9]{3,8}(-[a-zA-Z0-9]{3,8})*$/;
+Intl.supportedValuesOf("calendar").forEach(
+ function(calendar) {
+ assertTrue(regex.test(calendar),
+ "Intl.supportedValuesOf('calendar') return " + calendar +
+ " which does not meet 'type: alphanum{3,8}(sep alphanum{3,8})*'");
+ });