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* Contributors:darren.deridder@icarusproject.com,
20*                     pschwartau@netscape.com
21* Date: 07 July 2001
22*
23* SUMMARY: Regression test for Bugzilla bug 89474
24* See http://bugzilla.mozilla.org/show_bug.cgi?id=89474
25*
26* This test used to crash the JS shell. This was discovered
27* by Darren DeRidder <darren.deridder@icarusproject.com
28*/
29//-------------------------------------------------------------------------------------------------
30var bug = 89474;
31var summary = "Testing the JS shell doesn't crash on it.item()";
32var cnTest = 'it.item()';
33
34
35//-------------------------------------------------------------------------------------------------
36test();
37//-------------------------------------------------------------------------------------------------
38
39
40function test()
41{
42  enterFunc ('test');
43  printBugNumber (bug);
44  printStatus (summary);
45
46  tryThis(cnTest); // Just testing that we don't crash on this
47
48  exitFunc ('test');
49}
50
51
52function tryThis(sEval)
53{
54  try
55  {
56    eval(sEval);
57  }
58  catch(e)
59  {
60    // If we get here, we didn't crash.
61  }
62}
63