Debian Codegraph @

rhino/testsrc/tests/js1_5/Regress/regress-283477.js

raw symbols SCIP
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5
6 var gTestfile = 'regress-283477.js';
7 //-----------------------------------------------------------------------------
8 var BUGNUMBER = 283477;
9 var summary = 'a.lastIndexOf(b, c) should return -1 when there is no match';
10 var actual = '';
11 var expect = '';
12 var status;
13
14 enterFunc ('test');
15 printBugNumber(BUGNUMBER);
16 printStatus (summary);
17
18 status = summary + ' ' + inSection(1) + " " + '"".lastIndexOf("hello", 0);';
19 expect = -1;
20 actual = "".lastIndexOf("hello", 0);
21 reportCompare(expect, actual, status);
22
23 status = summary + ' ' + inSection(2) + " " + ' "".lastIndexOf("hello");';
24 expect = -1;
25 actual = "".lastIndexOf("hello");
26 reportCompare(expect, actual, status);
27
28 exitFunc ('test');