storage/test/unit/test_bug-429521.js

Wed, 31 Dec 2014 13:27:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 13:27:57 +0100
branch
TOR_BUG_3246
changeset 6
8bccb770b82d
permissions
-rw-r--r--

Ignore runtime configuration files generated during quality assurance.

     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/. */
     5 function setup() 
     6 {
     7     getOpenedDatabase().createTable("t1", "x TEXT");
     9     var stmt = createStatement("INSERT INTO t1 (x) VALUES ('/mozilla.org/20070129_1/Europe/Berlin')");
    10     stmt.execute();
    11     stmt.finalize();
    12 }
    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         ");");
    21     print("*** test_bug429521: started");
    23     try {
    24         while (stmt.executeStep()) {
    25             print("*** test_bug429521: step() Read wrapper.row.zone");
    27             // BUG: the print commands after the following statement
    28             // are never executed. Script stops immediately.
    29             var tzId = stmt.row.zone;
    31             print("*** test_bug429521: step() Read wrapper.row.zone finished");
    32         }
    33     } catch (e) {
    34         print("*** test_bug429521: " + e);
    35     }
    37     print("*** test_bug429521: finished");
    39     stmt.finalize();
    40 }
    42 function run_test()
    43 {
    44   setup();
    46   test_bug429521();
    48   cleanup();
    49 }

mercurial