summaryrefslogtreecommitdiffstats
path: root/js/src/tests/ecma_5/Global/decodeURI-decodes-FFFE-FFFF.js
blob: 28f3019cda8b6032cb3c7fc403cf2edc7d459f5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Any copyright is dedicated to the Public Domain.
// http://creativecommons.org/licenses/publicdomain/

//-----------------------------------------------------------------------------
var BUGNUMBER = 520095;
var summary =
  "decodeURI{,Component} should return the specified character for " +
  "'%EF%BF%BE' and '%EF%BF%BF', not return U+FFFD";

print(BUGNUMBER + ": " + summary);

/**************
 * BEGIN TEST *
 **************/

assertEq(decodeURI("%EF%BF%BE"), "\uFFFE");
assertEq(decodeURI("%EF%BF%BF"), "\uFFFF");
assertEq(decodeURIComponent("%EF%BF%BE"), "\uFFFE");
assertEq(decodeURIComponent("%EF%BF%BF"), "\uFFFF");

/******************************************************************************/

if (typeof reportCompare === "function")
  reportCompare(true, true);

print("All tests passed!");