From 36d22d82aa202bb199967e9512281e9a53db42c9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 21:33:14 +0200 Subject: Adding upstream version 115.7.0esr. Signed-off-by: Daniel Baumann --- .../toLowerCase/special_casing_conditional.js | 103 +++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 js/src/tests/test262/built-ins/String/prototype/toLowerCase/special_casing_conditional.js (limited to 'js/src/tests/test262/built-ins/String/prototype/toLowerCase/special_casing_conditional.js') diff --git a/js/src/tests/test262/built-ins/String/prototype/toLowerCase/special_casing_conditional.js b/js/src/tests/test262/built-ins/String/prototype/toLowerCase/special_casing_conditional.js new file mode 100644 index 0000000000..8356bbe54e --- /dev/null +++ b/js/src/tests/test262/built-ins/String/prototype/toLowerCase/special_casing_conditional.js @@ -0,0 +1,103 @@ +// Copyright (C) 2015 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: > + Check if String.prototype.toLowerCase supports conditional mappings defined in SpecialCasings +info: | + The result must be derived according to the locale-insensitive case mappings in the Unicode Character + Database (this explicitly includes not only the UnicodeData.txt file, but also all locale-insensitive + mappings in the SpecialCasings.txt file that accompanies it). +es5id: 15.5.4.16 +es6id: 21.1.3.22 +---*/ + +// SpecialCasing.txt, conditional, language-insensitive mappings. + +// ; ; ; <upper>; (<condition_list>;)? # <comment> +// 03A3; 03C2; 03A3; 03A3; Final_Sigma; # GREEK CAPITAL LETTER SIGMA +// 03A3; 03C3; 03A3; 03A3; # GREEK CAPITAL LETTER SIGMA + +// Final_Sigma is defined in Unicode 5.1, 3.13 Default Case Algorithms. + +assert.sameValue( + "\u03A3".toLowerCase(), + "\u03C3", + "Single GREEK CAPITAL LETTER SIGMA" +); + +// Sigma preceded by Cased and zero or more Case_Ignorable. +assert.sameValue( + "A\u03A3".toLowerCase(), + "a\u03C2", + "Sigma preceded by LATIN CAPITAL LETTER A" +); +assert.sameValue( + "\uD835\uDCA2\u03A3".toLowerCase(), + "\uD835\uDCA2\u03C2", + "Sigma preceded by MATHEMATICAL SCRIPT CAPITAL G (D835 DCA2 = 1D4A2)" +); +assert.sameValue( + "A.\u03A3".toLowerCase(), + "a.\u03C2", + "Sigma preceded by FULL STOP" +); +assert.sameValue( + "A\u00AD\u03A3".toLowerCase(), + "a\u00AD\u03C2", + "Sigma preceded by SOFT HYPHEN (00AD)" +); +assert.sameValue( + "A\uD834\uDE42\u03A3".toLowerCase(), + "a\uD834\uDE42\u03C2", + "Sigma preceded by COMBINING GREEK MUSICAL TRISEME (D834 DE42 = 1D242)" +); +assert.sameValue( + "\u0345\u03A3".toLowerCase(), + "\u0345\u03C3", + "Sigma preceded by COMBINING GREEK YPOGEGRAMMENI (0345)" +); +assert.sameValue( + "\u0391\u0345\u03A3".toLowerCase(), + "\u03B1\u0345\u03C2", + "Sigma preceded by GREEK CAPITAL LETTER ALPHA (0391), COMBINING GREEK YPOGEGRAMMENI (0345)" +); + +// Sigma not followed by zero or more Case_Ignorable and then Cased. +assert.sameValue( + "A\u03A3B".toLowerCase(), + "a\u03C3b", + "Sigma followed by LATIN CAPITAL LETTER B" +); +assert.sameValue( + "A\u03A3\uD835\uDCA2".toLowerCase(), + "a\u03C3\uD835\uDCA2", + "Sigma followed by MATHEMATICAL SCRIPT CAPITAL G (D835 DCA2 = 1D4A2)" +); +assert.sameValue( + "A\u03A3.b".toLowerCase(), + "a\u03C3.b", + "Sigma followed by FULL STOP" +); +assert.sameValue( + "A\u03A3\u00ADB".toLowerCase(), + "a\u03C3\u00ADb", + "Sigma followed by SOFT HYPHEN (00AD)" +); +assert.sameValue( + "A\u03A3\uD834\uDE42B".toLowerCase(), + "a\u03C3\uD834\uDE42b", + "Sigma followed by COMBINING GREEK MUSICAL TRISEME (D834 DE42 = 1D242)" +); +assert.sameValue( + "A\u03A3\u0345".toLowerCase(), + "a\u03C2\u0345", + "Sigma followed by COMBINING GREEK YPOGEGRAMMENI (0345)" +); +assert.sameValue( + "A\u03A3\u0345\u0391".toLowerCase(), + "a\u03C3\u0345\u03B1", + "Sigma followed by COMBINING GREEK YPOGEGRAMMENI (0345), GREEK CAPITAL LETTER ALPHA (0391)" +); + +reportCompare(0, 0); -- cgit v1.2.3