⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 expr.test

📁 最新的sqlite3.6.2源代码
💻 TEST
📖 第 1 页 / 共 3 页
字号:
test_expr expr-5.2a {t1='abc', t2='abc'} {t1 LIKE t2} 1test_expr expr-5.2b {t1='abc', t2='ABC'} {t1 LIKE t2} $NCSLtest_expr expr-5.3a {t1='abc', t2='a_c'} {t1 LIKE t2} 1test_expr expr-5.3b {t1='abc', t2='A_C'} {t1 LIKE t2} $NCSLtest_expr expr-5.4 {t1='abc', t2='abc_'} {t1 LIKE t2} 0test_expr expr-5.5a {t1='abc', t2='a%c'} {t1 LIKE t2} 1test_expr expr-5.5b {t1='abc', t2='A%C'} {t1 LIKE t2} $NCSLtest_expr expr-5.5c {t1='abdc', t2='a%c'} {t1 LIKE t2} 1test_expr expr-5.5d {t1='ac', t2='a%c'} {t1 LIKE t2} 1test_expr expr-5.5e {t1='ac', t2='A%C'} {t1 LIKE t2} $NCSLtest_expr expr-5.6a {t1='abxyzzyc', t2='a%c'} {t1 LIKE t2} 1test_expr expr-5.6b {t1='abxyzzyc', t2='A%C'} {t1 LIKE t2} $NCSLtest_expr expr-5.7a {t1='abxyzzy', t2='a%c'} {t1 LIKE t2} 0test_expr expr-5.7b {t1='abxyzzy', t2='A%C'} {t1 LIKE t2} 0test_expr expr-5.8a {t1='abxyzzycx', t2='a%c'} {t1 LIKE t2} 0test_expr expr-5.8b {t1='abxyzzycy', t2='a%cx'} {t1 LIKE t2} 0test_expr expr-5.8c {t1='abxyzzycx', t2='A%C'} {t1 LIKE t2} 0test_expr expr-5.8d {t1='abxyzzycy', t2='A%CX'} {t1 LIKE t2} 0test_expr expr-5.9a {t1='abc', t2='a%_c'} {t1 LIKE t2} 1test_expr expr-5.9b {t1='ac', t2='a%_c'} {t1 LIKE t2} 0test_expr expr-5.9c {t1='abc', t2='A%_C'} {t1 LIKE t2} $NCSLtest_expr expr-5.9d {t1='ac', t2='A%_C'} {t1 LIKE t2} 0test_expr expr-5.10a {t1='abxyzzyc', t2='a%_c'} {t1 LIKE t2} 1test_expr expr-5.10b {t1='abxyzzyc', t2='A%_C'} {t1 LIKE t2} $NCSLtest_expr expr-5.11 {t1='abc', t2='xyz'} {t1 NOT LIKE t2} 1test_expr expr-5.12a {t1='abc', t2='abc'} {t1 NOT LIKE t2} 0test_expr expr-5.12b {t1='abc', t2='ABC'} {t1 NOT LIKE t2} $CSLtest_expr expr-5.13  {t1='A'}  {t1 LIKE 'A%_'} 0test_expr expr-5.14  {t1='AB'} {t1 LIKE 'A%b' ESCAPE 'b'} 0# The following tests only work on versions of TCL that support Unicode#if {"\u1234"!="u1234"} {  test_expr expr-5.13a "t1='a\u0080c', t2='a_c'" {t1 LIKE t2} 1  test_expr expr-5.13b "t1='a\u0080c', t2='A_C'" {t1 LIKE t2} $NCSL  test_expr expr-5.14a "t1='a\u07FFc', t2='a_c'" {t1 LIKE t2} 1  test_expr expr-5.14b "t1='a\u07FFc', t2='A_C'" {t1 LIKE t2} $NCSL  test_expr expr-5.15a "t1='a\u0800c', t2='a_c'" {t1 LIKE t2} 1  test_expr expr-5.15b "t1='a\u0800c', t2='A_C'" {t1 LIKE t2} $NCSL  test_expr expr-5.16a "t1='a\uFFFFc', t2='a_c'" {t1 LIKE t2} 1  test_expr expr-5.16b "t1='a\uFFFFc', t2='A_C'" {t1 LIKE t2} $NCSL  test_expr expr-5.17 "t1='a\u0080', t2='A__'" {t1 LIKE t2} 0  test_expr expr-5.18 "t1='a\u07FF', t2='A__'" {t1 LIKE t2} 0  test_expr expr-5.19 "t1='a\u0800', t2='A__'" {t1 LIKE t2} 0  test_expr expr-5.20 "t1='a\uFFFF', t2='A__'" {t1 LIKE t2} 0  test_expr expr-5.21a "t1='ax\uABCD', t2='a_\uABCD'" {t1 LIKE t2} 1  test_expr expr-5.21b "t1='ax\uABCD', t2='A_\uABCD'" {t1 LIKE t2} $NCSL  test_expr expr-5.22a "t1='ax\u1234', t2='a%\u1234'" {t1 LIKE t2} 1  test_expr expr-5.22b "t1='ax\u1234', t2='A%\u1234'" {t1 LIKE t2} $NCSL  test_expr expr-5.23a "t1='ax\uFEDC', t2='a_%'" {t1 LIKE t2} 1  test_expr expr-5.23b "t1='ax\uFEDC', t2='A_%'" {t1 LIKE t2} $NCSL  test_expr expr-5.24a "t1='ax\uFEDCy\uFEDC', t2='a%\uFEDC'" {t1 LIKE t2} 1  test_expr expr-5.24b "t1='ax\uFEDCy\uFEDC', t2='A%\uFEDC'" {t1 LIKE t2} $NCSL}test_expr expr-5.54 {t1='abc', t2=NULL} {t1 LIKE t2} {{}}test_expr expr-5.55 {t1='abc', t2=NULL} {t1 NOT LIKE t2} {{}}test_expr expr-5.56 {t1='abc', t2=NULL} {t2 LIKE t1} {{}}test_expr expr-5.57 {t1='abc', t2=NULL} {t2 NOT LIKE t1} {{}}# LIKE expressions that use ESCAPE characters.test_expr expr-5.58a {t1='abc', t2='a_c'}   {t1 LIKE t2 ESCAPE '7'} 1test_expr expr-5.58b {t1='abc', t2='A_C'}   {t1 LIKE t2 ESCAPE '7'} $NCSLtest_expr expr-5.59a {t1='a_c', t2='a7_c'}  {t1 LIKE t2 ESCAPE '7'} 1test_expr expr-5.59b {t1='a_c', t2='A7_C'}  {t1 LIKE t2 ESCAPE '7'} $NCSLtest_expr expr-5.60a {t1='abc', t2='a7_c'}  {t1 LIKE t2 ESCAPE '7'} 0test_expr expr-5.60b {t1='abc', t2='A7_C'}  {t1 LIKE t2 ESCAPE '7'} 0test_expr expr-5.61a {t1='a7Xc', t2='a7_c'} {t1 LIKE t2 ESCAPE '7'} 0test_expr expr-5.61b {t1='a7Xc', t2='A7_C'} {t1 LIKE t2 ESCAPE '7'} 0test_expr expr-5.62a {t1='abcde', t2='a%e'} {t1 LIKE t2 ESCAPE '7'} 1test_expr expr-5.62b {t1='abcde', t2='A%E'} {t1 LIKE t2 ESCAPE '7'} $NCSLtest_expr expr-5.63a {t1='abcde', t2='a7%e'} {t1 LIKE t2 ESCAPE '7'} 0test_expr expr-5.63b {t1='abcde', t2='A7%E'} {t1 LIKE t2 ESCAPE '7'} 0test_expr expr-5.64a {t1='a7cde', t2='a7%e'} {t1 LIKE t2 ESCAPE '7'} 0test_expr expr-5.64b {t1='a7cde', t2='A7%E'} {t1 LIKE t2 ESCAPE '7'} 0test_expr expr-5.65a {t1='a7cde', t2='a77%e'} {t1 LIKE t2 ESCAPE '7'} 1test_expr expr-5.65b {t1='a7cde', t2='A77%E'} {t1 LIKE t2 ESCAPE '7'} $NCSLtest_expr expr-5.66a {t1='abc7', t2='a%77'} {t1 LIKE t2 ESCAPE '7'} 1test_expr expr-5.66b {t1='abc7', t2='A%77'} {t1 LIKE t2 ESCAPE '7'} $NCSLtest_expr expr-5.67a {t1='abc_', t2='a%7_'} {t1 LIKE t2 ESCAPE '7'} 1test_expr expr-5.67b {t1='abc_', t2='A%7_'} {t1 LIKE t2 ESCAPE '7'} $NCSLtest_expr expr-5.68a {t1='abc7', t2='a%7_'} {t1 LIKE t2 ESCAPE '7'} 0test_expr expr-5.68b {t1='abc7', t2='A%7_'} {t1 LIKE t2 ESCAPE '7'} 0# These are the same test as the block above, but using a multi-byte # character as the escape character.if {"\u1234"!="u1234"} {  test_expr expr-5.69a "t1='abc', t2='a_c'" \      "t1 LIKE t2 ESCAPE '\u1234'" 1  test_expr expr-5.69b "t1='abc', t2='A_C'" \      "t1 LIKE t2 ESCAPE '\u1234'" $NCSL  test_expr expr-5.70a "t1='a_c', t2='a\u1234_c'" \      "t1 LIKE t2 ESCAPE '\u1234'" 1  test_expr expr-5.70b "t1='a_c', t2='A\u1234_C'" \      "t1 LIKE t2 ESCAPE '\u1234'" $NCSL  test_expr expr-5.71a "t1='abc', t2='a\u1234_c'" \       "t1 LIKE t2 ESCAPE '\u1234'" 0  test_expr expr-5.71b "t1='abc', t2='A\u1234_C'" \       "t1 LIKE t2 ESCAPE '\u1234'" 0  test_expr expr-5.72a "t1='a\u1234Xc', t2='a\u1234_c'" \      "t1 LIKE t2 ESCAPE '\u1234'" 0  test_expr expr-5.72b "t1='a\u1234Xc', t2='A\u1234_C'" \      "t1 LIKE t2 ESCAPE '\u1234'" 0  test_expr expr-5.73a "t1='abcde', t2='a%e'" \      "t1 LIKE t2 ESCAPE '\u1234'" 1  test_expr expr-5.73b "t1='abcde', t2='A%E'" \      "t1 LIKE t2 ESCAPE '\u1234'" $NCSL  test_expr expr-5.74a "t1='abcde', t2='a\u1234%e'" \      "t1 LIKE t2 ESCAPE '\u1234'" 0  test_expr expr-5.74b "t1='abcde', t2='A\u1234%E'" \      "t1 LIKE t2 ESCAPE '\u1234'" 0  test_expr expr-5.75a "t1='a\u1234cde', t2='a\u1234%e'" \      "t1 LIKE t2 ESCAPE '\u1234'" 0  test_expr expr-5.75b "t1='a\u1234cde', t2='A\u1234%E'" \      "t1 LIKE t2 ESCAPE '\u1234'" 0  test_expr expr-5.76a "t1='a\u1234cde', t2='a\u1234\u1234%e'" \      "t1 LIKE t2 ESCAPE '\u1234'" 1  test_expr expr-5.76b "t1='a\u1234cde', t2='A\u1234\u1234%E'" \      "t1 LIKE t2 ESCAPE '\u1234'" $NCSL  test_expr expr-5.77a "t1='abc\u1234', t2='a%\u1234\u1234'" \      "t1 LIKE t2 ESCAPE '\u1234'" 1  test_expr expr-5.77b "t1='abc\u1234', t2='A%\u1234\u1234'" \      "t1 LIKE t2 ESCAPE '\u1234'" $NCSL  test_expr expr-5.78a "t1='abc_', t2='a%\u1234_'" \      "t1 LIKE t2 ESCAPE '\u1234'" 1  test_expr expr-5.78b "t1='abc_', t2='A%\u1234_'" \      "t1 LIKE t2 ESCAPE '\u1234'" $NCSL  test_expr expr-5.79a "t1='abc\u1234', t2='a%\u1234_'" \      "t1 LIKE t2 ESCAPE '\u1234'" 0  test_expr expr-5.79b "t1='abc\u1234', t2='A%\u1234_'" \      "t1 LIKE t2 ESCAPE '\u1234'" 0}test_expr expr-6.1 {t1='abc', t2='xyz'} {t1 GLOB t2} 0test_expr expr-6.2 {t1='abc', t2='ABC'} {t1 GLOB t2} 0test_expr expr-6.3 {t1='abc', t2='A?C'} {t1 GLOB t2} 0test_expr expr-6.4 {t1='abc', t2='a?c'} {t1 GLOB t2} 1test_expr expr-6.5 {t1='abc', t2='abc?'} {t1 GLOB t2} 0test_expr expr-6.6 {t1='abc', t2='A*C'} {t1 GLOB t2} 0test_expr expr-6.7 {t1='abc', t2='a*c'} {t1 GLOB t2} 1test_expr expr-6.8 {t1='abxyzzyc', t2='a*c'} {t1 GLOB t2} 1test_expr expr-6.9 {t1='abxyzzy', t2='a*c'} {t1 GLOB t2} 0test_expr expr-6.10 {t1='abxyzzycx', t2='a*c'} {t1 GLOB t2} 0test_expr expr-6.11 {t1='abc', t2='xyz'} {t1 NOT GLOB t2} 1test_expr expr-6.12 {t1='abc', t2='abc'} {t1 NOT GLOB t2} 0test_expr expr-6.13 {t1='abc', t2='a[bx]c'} {t1 GLOB t2} 1test_expr expr-6.14 {t1='abc', t2='a[cx]c'} {t1 GLOB t2} 0test_expr expr-6.15 {t1='abc', t2='a[a-d]c'} {t1 GLOB t2} 1test_expr expr-6.16 {t1='abc', t2='a[^a-d]c'} {t1 GLOB t2} 0test_expr expr-6.17 {t1='abc', t2='a[A-Dc]c'} {t1 GLOB t2} 0test_expr expr-6.18 {t1='abc', t2='a[^A-Dc]c'} {t1 GLOB t2} 1test_expr expr-6.19 {t1='abc', t2='a[]b]c'} {t1 GLOB t2} 1test_expr expr-6.20 {t1='abc', t2='a[^]b]c'} {t1 GLOB t2} 0test_expr expr-6.21a {t1='abcdefg', t2='a*[de]g'} {t1 GLOB t2} 0test_expr expr-6.21b {t1='abcdefg', t2='a*[df]g'} {t1 GLOB t2} 1test_expr expr-6.21c {t1='abcdefg', t2='a*[d-h]g'} {t1 GLOB t2} 1test_expr expr-6.21d {t1='abcdefg', t2='a*[b-e]g'} {t1 GLOB t2} 0test_expr expr-6.22a {t1='abcdefg', t2='a*[^de]g'} {t1 GLOB t2} 1test_expr expr-6.22b {t1='abcdefg', t2='a*[^def]g'} {t1 GLOB t2} 0test_expr expr-6.23 {t1='abcdefg', t2='a*?g'} {t1 GLOB t2} 1test_expr expr-6.24 {t1='ac', t2='a*c'} {t1 GLOB t2} 1test_expr expr-6.25 {t1='ac', t2='a*?c'} {t1 GLOB t2} 0test_expr expr-6.26 {t1='a*c', t2='a[*]c'} {t1 GLOB t2} 1test_expr expr-6.27 {t1='a?c', t2='a[?]c'} {t1 GLOB t2} 1test_expr expr-6.28 {t1='a[c', t2='a[[]c'} {t1 GLOB t2} 1# These tests only work on versions of TCL that support Unicode#if {"\u1234"!="u1234"} {  test_expr expr-6.26 "t1='a\u0080c', t2='a?c'" {t1 GLOB t2} 1  test_expr expr-6.27 "t1='a\u07ffc', t2='a?c'" {t1 GLOB t2} 1  test_expr expr-6.28 "t1='a\u0800c', t2='a?c'" {t1 GLOB t2} 1  test_expr expr-6.29 "t1='a\uffffc', t2='a?c'" {t1 GLOB t2} 1  test_expr expr-6.30 "t1='a\u1234', t2='a?'" {t1 GLOB t2} 1  test_expr expr-6.31 "t1='a\u1234', t2='a??'" {t1 GLOB t2} 0  test_expr expr-6.32 "t1='ax\u1234', t2='a?\u1234'" {t1 GLOB t2} 1  test_expr expr-6.33 "t1='ax\u1234', t2='a*\u1234'" {t1 GLOB t2} 1  test_expr expr-6.34 "t1='ax\u1234y\u1234', t2='a*\u1234'" {t1 GLOB t2} 1  test_expr expr-6.35 "t1='a\u1234b', t2='a\[x\u1234y\]b'" {t1 GLOB t2} 1  test_expr expr-6.36 "t1='a\u1234b', t2='a\[\u1233-\u1235\]b'" {t1 GLOB t2} 1  test_expr expr-6.37 "t1='a\u1234b', t2='a\[\u1234-\u124f\]b'" {t1 GLOB t2} 1  test_expr expr-6.38 "t1='a\u1234b', t2='a\[\u1235-\u124f\]b'" {t1 GLOB t2} 0  test_expr expr-6.39 "t1='a\u1234b', t2='a\[a-\u1235\]b'" {t1 GLOB t2} 1  test_expr expr-6.40 "t1='a\u1234b', t2='a\[a-\u1234\]b'" {t1 GLOB t2} 1  test_expr expr-6.41 "t1='a\u1234b', t2='a\[a-\u1233\]b'" {t1 GLOB t2} 0}test_expr expr-6.51 {t1='ABC', t2='xyz'} {t1 GLOB t2} 0test_expr expr-6.52 {t1='ABC', t2='abc'} {t1 GLOB t2} 0test_expr expr-6.53 {t1='ABC', t2='a?c'} {t1 GLOB t2} 0test_expr expr-6.54 {t1='ABC', t2='A?C'} {t1 GLOB t2} 1test_expr expr-6.55 {t1='ABC', t2='abc?'} {t1 GLOB t2} 0test_expr expr-6.56 {t1='ABC', t2='a*c'} {t1 GLOB t2} 0test_expr expr-6.57 {t1='ABC', t2='A*C'} {t1 GLOB t2} 1test_expr expr-6.58 {t1='ABxyzzyC', t2='A*C'} {t1 GLOB t2} 1test_expr expr-6.59 {t1='ABxyzzy', t2='A*C'} {t1 GLOB t2} 0test_expr expr-6.60 {t1='ABxyzzyCx', t2='A*C'} {t1 GLOB t2} 0test_expr expr-6.61 {t1='ABC', t2='xyz'} {t1 NOT GLOB t2} 1test_expr expr-6.62 {t1='ABC', t2='ABC'} {t1 NOT GLOB t2} 0test_expr expr-6.63 {t1='ABC', t2='A[Bx]C'} {t1 GLOB t2} 1test_expr expr-6.64 {t1='ABC', t2='A[Cx]C'} {t1 GLOB t2} 0test_expr expr-6.65 {t1='ABC', t2='A[A-D]C'} {t1 GLOB t2} 1test_expr expr-6.66 {t1='ABC', t2='A[^A-D]C'} {t1 GLOB t2} 0test_expr expr-6.67 {t1='ABC', t2='A[a-dC]C'} {t1 GLOB t2} 0test_expr expr-6.68 {t1='ABC', t2='A[^a-dC]C'} {t1 GLOB t2} 1test_expr expr-6.69a {t1='ABC', t2='A[]B]C'} {t1 GLOB t2} 1test_expr expr-6.69b {t1='A]C', t2='A[]B]C'} {t1 GLOB t2} 1test_expr expr-6.70a {t1='ABC', t2='A[^]B]C'} {t1 GLOB t2} 0test_expr expr-6.70b {t1='AxC', t2='A[^]B]C'} {t1 GLOB t2} 1test_expr expr-6.70c {t1='A]C', t2='A[^]B]C'} {t1 GLOB t2} 0test_expr expr-6.71 {t1='ABCDEFG', t2='A*[DE]G'} {t1 GLOB t2} 0test_expr expr-6.72 {t1='ABCDEFG', t2='A*[^DE]G'} {t1 GLOB t2} 1test_expr expr-6.73 {t1='ABCDEFG', t2='A*?G'} {t1 GLOB t2} 1test_expr expr-6.74 {t1='AC', t2='A*C'} {t1 GLOB t2} 1test_expr expr-6.75 {t1='AC', t2='A*?C'} {t1 GLOB t2} 0test_expr expr-6.63 {t1=NULL, t2='a*?c'} {t1 GLOB t2} {{}}test_expr expr-6.64 {t1='ac', t2=NULL} {t1 GLOB t2} {{}}test_expr expr-6.65 {t1=NULL, t2='a*?c'} {t1 NOT GLOB t2} {{}}test_expr expr-6.66 {t1='ac', t2=NULL} {t1 NOT GLOB t2} {{}}# Check that the affinity of a CAST expression is calculated correctly.ifcapable cast {  test_expr expr-6.67 {t1='01', t2=1} {t1 = t2} 0  test_expr expr-6.68 {t1='1', t2=1} {t1 = t2} 1  test_expr expr-6.69 {t1='01', t2=1} {CAST(t1 AS INTEGER) = t2} 1}test_expr expr-case.1 {i1=1, i2=2} \	{CASE WHEN i1 = i2 THEN 'eq' ELSE 'ne' END} netest_expr expr-case.2 {i1=2, i2=2} \	{CASE WHEN i1 = i2 THEN 'eq' ELSE 'ne' END} eqtest_expr expr-case.3 {i1=NULL, i2=2} \	{CASE WHEN i1 = i2 THEN 'eq' ELSE 'ne' END} netest_expr expr-case.4 {i1=2, i2=NULL} \	{CASE WHEN i1 = i2 THEN 'eq' ELSE 'ne' END} netest_expr expr-case.5 {i1=2} \	{CASE i1 WHEN 1 THEN 'one' WHEN 2 THEN 'two' ELSE 'error' END} twotest_expr expr-case.6 {i1=1} \	{CASE i1 WHEN 1 THEN 'one' WHEN NULL THEN 'two' ELSE 'error' END} onetest_expr expr-case.7 {i1=2} \	{CASE i1 WHEN 1 THEN 'one' WHEN NULL THEN 'two' ELSE 'error' END} errortest_expr expr-case.8 {i1=3} \	{CASE i1 WHEN 1 THEN 'one' WHEN NULL THEN 'two' ELSE 'error' END} errortest_expr expr-case.9 {i1=3} \	{CASE i1 WHEN 1 THEN 'one' WHEN 2 THEN 'two' ELSE 'error' END} errortest_expr expr-case.10 {i1=3} \	{CASE i1 WHEN 1 THEN 'one' WHEN 2 THEN 'two' END} {{}}test_expr expr-case.11 {i1=null} \	{CASE i1 WHEN 1 THEN 'one' WHEN 2 THEN 'two' ELSE 3 END} 3test_expr expr-case.12 {i1=1} \	{CASE i1 WHEN 1 THEN null WHEN 2 THEN 'two' ELSE 3 END} {{}}test_expr expr-case.13 {i1=7} \

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -