| 123456789101112131415 |
- //-------------------------------------------------------------------------------------------------------
- // Copyright (C) Microsoft. All rights reserved.
- // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
- //-------------------------------------------------------------------------------------------------------
- // This test cases test if a string that is UTF-8 encoded string with surrogate code units encoded as 3 bytes UTF8 characters prints correctly or not.
- // For this test case to work, please save this file with UTF-8 encoding
- var y = "function () { '鄏𡄻�莞�遲���屢���箋成鄏賴旭鄑温收鄏擒�鄏賴忖 鄏兒江鄏眇成鄑温戍鄍�' ;WScript.Echo('hello'); }"
- var x = function () { '鄏𡄻�莞�遲���屢���箋成鄏賴旭鄑温收鄏擒�鄏賴忖 鄏兒江鄏眇成鄑温戍鄍�' ;WScript.Echo('hello'); }
- // 2 bytes
- var y2 = "function () { '𥌓 kugu' ;WScript.Echo('hello'); }"
- var x2 = function () { '𥌓 kugu' ;WScript.Echo('hello'); }
- WScript.Echo((x.toString() === y && x2.toString() === y2) ? "PASS" : "FAIL");
|