# 2019 August 10 # # The author disclaims copyright to this source code. In place of # a legal notice, here is a blessing: # # May you do good and not evil. # May you find forgiveness for yourself and forgive others. # May you share freely, never taking more than you give. # #*********************************************************************** # This file implements regression tests for SQLite library. # #################################################### # DO NOT EDIT! THIS FILE IS AUTOMATICALLY GENERATED! #################################################### set testdir [file dirname $argv0] source $testdir/tester.tcl set testprefix nulls1 do_execsql_test 1.0 { DROP TABLE IF EXISTS t3; CREATE TABLE t3(a INTEGER); INSERT INTO t3 VALUES(NULL), (10), (30), (20), (NULL); } {} for {set a 0} {$a < 2} {incr a} { foreach {tn limit} { 1 "" 2 "LIMIT 10" } { do_execsql_test 1.$a.$tn.1 " SELECT a FROM t3 ORDER BY a nULLS FIRST $limit " {{} {} 10 20 30} do_execsql_test 1.$a.$tn.2 " SELECT a FROM t3 ORDER BY a nULLS LAST $limit " {10 20 30 {} {}} do_execsql_test 1.$a.$tn.3 " SELECT a FROM t3 ORDER BY a DESC nULLS FIRST $limit " {{} {} 30 20 10} do_execsql_test 1.$a.$tn.4 " SELECT a FROM t3 ORDER BY a DESC nULLS LAST $limit " {30 20 10 {} {}} } catchsql { CREATE INDEX i1 ON t3(a) } } finish_test