]> git.saurik.com Git - apple/javascriptcore.git/blob - tests/mozilla/js1_5/Regress/regress-82306.js
6841fd5f7f5fe4b3583747ce60730ffd0c8da73d
[apple/javascriptcore.git] / tests / mozilla / js1_5 / Regress / regress-82306.js
1 /*
2 * The contents of this file are subject to the Netscape Public
3 * License Version 1.1 (the "License"); you may not use this file
4 * except in compliance with the License. You may obtain a copy of
5 * the License at http://www.mozilla.org/NPL/
6 *
7 * Software distributed under the License is distributed on an "AS
8 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
9 * implied. See the License for the specific language governing
10 * rights and limitations under the License.
11 *
12 * The Original Code is mozilla.org code.
13 *
14 * The Initial Developer of the Original Code is Netscape
15 * Communications Corporation. Portions created by Netscape are
16 * Copyright (C) 1998 Netscape Communications Corporation. All
17 * Rights Reserved.
18 *
19 * Contributor(s): pschwartau@netscape.com, epstein@tellme.com
20 * Date: 23 May 2001
21 *
22 * SUMMARY: Regression test for Bugzilla bug 82306
23 * See http://bugzilla.mozilla.org/show_bug.cgi?id=82306
24 *
25 * This test used to crash the JS engine. This was discovered
26 * by Mike Epstein <epstein@tellme.com>
27 */
28 //-------------------------------------------------------------------------------------------------
29 var bug = 82306;
30 var summary = "Testing we don't crash on encodeURI()";
31 var URI = '';
32
33
34 //-------------------------------------------------------------------------------------------------
35 test();
36 //-------------------------------------------------------------------------------------------------
37
38
39 function test()
40 {
41 enterFunc ('test');
42 printBugNumber (bug);
43 printStatus (summary);
44
45 URI += '<?xml version="1.0"?>';
46 URI += '<zcti application="xxxx_demo">';
47 URI += '<pstn_data>';
48 URI += '<ani>650-930-xxxx</ani>';
49 URI += '<dnis>877-485-xxxx</dnis>';
50 URI += '</pstn_data>';
51 URI += '<keyvalue key="name" value="xxx"/>';
52 URI += '<keyvalue key="phone" value="6509309000"/>';
53 URI += '</zcti>';
54
55 // Just testing that we don't crash on this
56 encodeURI(URI);
57
58 exitFunc ('test');
59 }