diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
commit | 26a029d407be480d791972afb5975cf62c9360a6 (patch) | |
tree | f435a8308119effd964b339f76abb83a57c29483 /js/src/tests/test262/built-ins/RegExp/prototype/flags/return-order.js | |
parent | Initial commit. (diff) | |
download | firefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz firefox-26a029d407be480d791972afb5975cf62c9360a6.zip |
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'js/src/tests/test262/built-ins/RegExp/prototype/flags/return-order.js')
-rw-r--r-- | js/src/tests/test262/built-ins/RegExp/prototype/flags/return-order.js | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/RegExp/prototype/flags/return-order.js b/js/src/tests/test262/built-ins/RegExp/prototype/flags/return-order.js new file mode 100644 index 0000000000..437f27daeb --- /dev/null +++ b/js/src/tests/test262/built-ins/RegExp/prototype/flags/return-order.js @@ -0,0 +1,29 @@ +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-get-regexp.prototype.flags +description: > + RegExp.prototype.flags come in a single order, independent of source order +info: | + 4. Let global be ToBoolean(? Get(R, "global")). + 5. If global is true, append "g" as the last code unit of result. + 6. Let global be ToBoolean(? Get(R, "global")). + 7. If global is true, append "g" as the last code unit of result. + 8. Let ignoreCase be ToBoolean(? Get(R, "ignoreCase")). + 9. If ignoreCase is true, append "i" as the last code unit of result. + 10. Let multiline be ToBoolean(? Get(R, "multiline")). + 11. If multiline is true, append "m" as the last code unit of result. + 12. Let dotAll be ToBoolean(? Get(R, "dotAll")). + 13. If dotAll is true, append "s" as the last code unit of result. + 14. Let unicode be ToBoolean(? Get(R, "unicode")). + 15. If unicode is true, append "u" as the last code unit of result. + 16. Let sticky be ToBoolean(? Get(R, "sticky")). + 17. If sticky is true, append "y" as the last code unit of result. +features: [regexp-dotall, regexp-match-indices] +---*/ + +assert.sameValue(new RegExp("", "dgimsuy").flags, "dgimsuy", "dgimsuy => dgimsuy"); +assert.sameValue(new RegExp("", "yusmigd").flags, "dgimsuy", "yusmigd => dgimsuy"); + +reportCompare(0, 0); |