storage/test/unit/test_bug-429521.js

branch
TOR_BUG_9701
changeset 8
97036ab72558
equal deleted inserted replaced
-1:000000000000 0:d4aa353022ef
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4
5 function setup()
6 {
7 getOpenedDatabase().createTable("t1", "x TEXT");
8
9 var stmt = createStatement("INSERT INTO t1 (x) VALUES ('/mozilla.org/20070129_1/Europe/Berlin')");
10 stmt.execute();
11 stmt.finalize();
12 }
13
14 function test_bug429521()
15 {
16 var stmt = createStatement(
17 "SELECT DISTINCT(zone) FROM ("+
18 "SELECT x AS zone FROM t1 WHERE x LIKE '/mozilla.org%'" +
19 ");");
20
21 print("*** test_bug429521: started");
22
23 try {
24 while (stmt.executeStep()) {
25 print("*** test_bug429521: step() Read wrapper.row.zone");
26
27 // BUG: the print commands after the following statement
28 // are never executed. Script stops immediately.
29 var tzId = stmt.row.zone;
30
31 print("*** test_bug429521: step() Read wrapper.row.zone finished");
32 }
33 } catch (e) {
34 print("*** test_bug429521: " + e);
35 }
36
37 print("*** test_bug429521: finished");
38
39 stmt.finalize();
40 }
41
42 function run_test()
43 {
44 setup();
45
46 test_bug429521();
47
48 cleanup();
49 }

mercurial