|
1 // Any copyright is dedicated to the Public Domain. |
|
2 // http://creativecommons.org/licenses/publicdomain/ |
|
3 |
|
4 //----------------------------------------------------------------------------- |
|
5 var BUGNUMBER = 520095; |
|
6 var summary = |
|
7 "decodeURI{,Component} should return the specified character for " + |
|
8 "'%EF%BF%BE' and '%EF%BF%BF', not return U+FFFD"; |
|
9 |
|
10 print(BUGNUMBER + ": " + summary); |
|
11 |
|
12 /************** |
|
13 * BEGIN TEST * |
|
14 **************/ |
|
15 |
|
16 assertEq(decodeURI("%EF%BF%BE"), "\uFFFE"); |
|
17 assertEq(decodeURI("%EF%BF%BF"), "\uFFFF"); |
|
18 assertEq(decodeURIComponent("%EF%BF%BE"), "\uFFFE"); |
|
19 assertEq(decodeURIComponent("%EF%BF%BF"), "\uFFFF"); |
|
20 |
|
21 /******************************************************************************/ |
|
22 |
|
23 if (typeof reportCompare === "function") |
|
24 reportCompare(true, true); |
|
25 |
|
26 print("All tests passed!"); |