AryaWu/sqlite
0
1# 2024 Jan 232#3# The author disclaims copyright to this source code. In place of4# a legal notice, here is a blessing:5#6# May you do good and not evil.7# May you find forgiveness for yourself and forgive others.8# May you share freely, never taking more than you give.9#10#***********************************************************************11# This file implements regression tests for SQLite library.12#13 14####################################################15# DO NOT EDIT! THIS FILE IS AUTOMATICALLY GENERATED!16####################################################17 18set testdir [file dirname $argv0]19source $testdir/tester.tcl20set testprefix literal221 22do_execsql_test 1.0 {23 SELECT 123_45624} {123456}25 26# PG says ERROR: trailing junk after numeric literal at or near "123_"27do_test 1.1 { catch { execsql {28 SELECT 123__45629} } } 130 31 32do_test 2.1 {33 set myres {}34 foreach r [db eval {SELECT 1.0e1_2}] {35 lappend myres [format %.4f [set r]]36 }37 set res2 {1000000000000.0000}38 set i 039 foreach r [set myres] r2 [set res2] {40 if {[set r]<([set r2]-0.0001) || [set r]>([set r2]+0.0001)} {41 error "list element [set i] does not match: got=[set r] expected=[set r2]"42 }43 incr i44 }45 set {} {}46} {}47 48do_execsql_test 3.0.0 {49 SELECT 0xFF_FF50} {65535}51 52do_execsql_test 3.0.1 {53 SELECT 0xFF_EF54} {65519}55 56# PG says ERROR: trailing junk after numeric literal at or near "0xFF_"57do_test 3.0.2 { catch { execsql {58 SELECT 0xFF__EF59} } } 160 61# PG says ERROR: trailing junk after numeric literal at or near "0xFFEF_"62do_test 3.0.4 { catch { execsql {63 SELECT 0xFFEF_64} } } 165 66do_execsql_test 3.1.0 {67 SELECT 0XFF_FF68} {65535}69 70do_execsql_test 3.1.1 {71 SELECT 0XFF_EF72} {65519}73 74# PG says ERROR: trailing junk after numeric literal at or near "0XFF_"75do_test 3.1.2 { catch { execsql {76 SELECT 0XFF__EF77} } } 178 79# PG says ERROR: trailing junk after numeric literal at or near "0XFFEF_"80do_test 3.1.4 { catch { execsql {81 SELECT 0XFFEF_82} } } 183 84finish_test85 