sl@0: # 2008 July 7 sl@0: # sl@0: # The author disclaims copyright to this source code. In place of sl@0: # a legal notice, here is a blessing: sl@0: # sl@0: # May you do good and not evil. sl@0: # May you find forgiveness for yourself and forgive others. sl@0: # May you share freely, never taking more than you give. sl@0: # sl@0: #*********************************************************************** sl@0: # This file implements regression tests for SQLite library. The sl@0: # focus of this script testing the tokenizer sl@0: # sl@0: # $Id: tokenize.test,v 1.1 2008/07/08 00:06:51 drh Exp $ sl@0: # sl@0: sl@0: set testdir [file dirname $argv0] sl@0: source $testdir/tester.tcl sl@0: sl@0: do_test tokenize-1.1 { sl@0: catchsql {SELECT 1.0e+} sl@0: } {1 {unrecognized token: "1.0e"}} sl@0: do_test tokenize-1.2 { sl@0: catchsql {SELECT 1.0E+} sl@0: } {1 {unrecognized token: "1.0E"}} sl@0: do_test tokenize-1.3 { sl@0: catchsql {SELECT 1.0e-} sl@0: } {1 {unrecognized token: "1.0e"}} sl@0: do_test tokenize-1.4 { sl@0: catchsql {SELECT 1.0E-} sl@0: } {1 {unrecognized token: "1.0E"}} sl@0: do_test tokenize-1.5 { sl@0: catchsql {SELECT 1.0e+/} sl@0: } {1 {unrecognized token: "1.0e"}} sl@0: do_test tokenize-1.6 { sl@0: catchsql {SELECT 1.0E+:} sl@0: } {1 {unrecognized token: "1.0E"}} sl@0: do_test tokenize-1.7 { sl@0: catchsql {SELECT 1.0e-:} sl@0: } {1 {unrecognized token: "1.0e"}} sl@0: do_test tokenize-1.8 { sl@0: catchsql {SELECT 1.0E-/} sl@0: } {1 {unrecognized token: "1.0E"}} sl@0: do_test tokenize-1.9 { sl@0: catchsql {SELECT 1.0F+5} sl@0: } {1 {unrecognized token: "1.0F"}} sl@0: do_test tokenize-1.10 { sl@0: catchsql {SELECT 1.0d-10} sl@0: } {1 {unrecognized token: "1.0d"}} sl@0: do_test tokenize-1.11 { sl@0: catchsql {SELECT 1.0e,5} sl@0: } {1 {unrecognized token: "1.0e"}} sl@0: do_test tokenize-1.12 { sl@0: catchsql {SELECT 1.0E.10} sl@0: } {1 {unrecognized token: "1.0E"}} sl@0: sl@0: do_test tokenize-2.1 { sl@0: catchsql {SELECT 1, 2 /*} sl@0: } {1 {near "*": syntax error}} sl@0: do_test tokenize-2.2 { sl@0: catchsql {SELECT 1, 2 /* } sl@0: } {0 {1 2}} sl@0: sl@0: sl@0: finish_test