diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /js/src/tests/non262/Date | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'js/src/tests/non262/Date')
-rw-r--r-- | js/src/tests/non262/Date/dashed-date.js | 6 | ||||
-rw-r--r-- | js/src/tests/non262/Date/parse-keywords.js | 7 |
2 files changed, 10 insertions, 3 deletions
diff --git a/js/src/tests/non262/Date/dashed-date.js b/js/src/tests/non262/Date/dashed-date.js index e479904098..d7b4692e7f 100644 --- a/js/src/tests/non262/Date/dashed-date.js +++ b/js/src/tests/non262/Date/dashed-date.js @@ -46,12 +46,10 @@ const tests = [ // ==== Date followed by hour and TZ ==== ["24-Apr-2023 12:34:56", "2023-04-24T12:34:56"], - ["24-Apr-2023 Mon 12:34:56", "2023-04-24T12:34:56"], ["24-Apr-2023 (Mon) 12:34:56", "2023-04-24T12:34:56"], ["24-Apr-2023(Mon)12:34:56", "2023-04-24T12:34:56"], ["24-Apr-2023,12:34:56", "2023-04-24T12:34:56"], - ["24-Apr-2023,Mon 12:34:56", "2023-04-24T12:34:56"], ["24-Apr-2023 12:34:56 GMT", "2023-04-24T12:34:56Z"], ["24-Apr-2023 12:34:56 +04", "2023-04-24T12:34:56+04:00"], @@ -145,6 +143,10 @@ const invalidTests = [ "24-Apr-2312+10:13:14", "24-Apr-2312=10:13:14", "24-Apr-2312?10:13:14", + + // Late weekday + "24-Apr-2023 Mon 12:34:56", + "24-Apr-2023,Mon 12:34:56", ]; for (const testString of invalidTests) { diff --git a/js/src/tests/non262/Date/parse-keywords.js b/js/src/tests/non262/Date/parse-keywords.js index c834bbfe0b..ba3b50b71b 100644 --- a/js/src/tests/non262/Date/parse-keywords.js +++ b/js/src/tests/non262/Date/parse-keywords.js @@ -12,7 +12,6 @@ const accepted = { "Sep 26 1995 10:00 am": "1995-09-26T10:00:00", "Sep 26 1995 10:00 AM": "1995-09-26T10:00:00", "Sep 26 1995 10:00 pm": "1995-09-26T22:00:00", - "Sep 26 Thurs 1995 Mon 10:thursday:00": "1995-09-26T10:00:00", }; const rejected = [ "Sep 26 1995 G", @@ -22,6 +21,12 @@ const rejected = [ "Sep 26 1995 10:00 a", "Sep 26 1995 10:00 p", "0/zx", + + // Late weekday + "Sep 26 Thurs 1995 10:00", + "Sep 26 1995 Thurs 10:00", + "Sep 26 1995 10:Thurs:00", + "Sep 26 1995 10:00 Thurs", ]; for (const [test, expected] of Object.entries(accepted)) { |