michael@0: // Any copyright is dedicated to the Public Domain. michael@0: // http://creativecommons.org/licenses/publicdomain/ michael@0: michael@0: //----------------------------------------------------------------------------- michael@0: var BUGNUMBER = 520095; michael@0: var summary = michael@0: "decodeURI{,Component} should return the specified character for " + michael@0: "'%EF%BF%BE' and '%EF%BF%BF', not return U+FFFD"; michael@0: michael@0: print(BUGNUMBER + ": " + summary); michael@0: michael@0: /************** michael@0: * BEGIN TEST * michael@0: **************/ michael@0: michael@0: assertEq(decodeURI("%EF%BF%BE"), "\uFFFE"); michael@0: assertEq(decodeURI("%EF%BF%BF"), "\uFFFF"); michael@0: assertEq(decodeURIComponent("%EF%BF%BE"), "\uFFFE"); michael@0: assertEq(decodeURIComponent("%EF%BF%BF"), "\uFFFF"); michael@0: michael@0: /******************************************************************************/ michael@0: michael@0: if (typeof reportCompare === "function") michael@0: reportCompare(true, true); michael@0: michael@0: print("All tests passed!");