?? expr.test
字號:
test_expr expr-4.8 {t1='0.0', t2='abc'} {t1<t2} 1test_expr expr-4.9 {t1='0.0', t2='abc'} {t1==t2} 0test_expr expr-4.10 {r1='0.0', r2='abc'} {r1>r2} 0test_expr expr-4.11 {r1='abc', r2='Abc'} {r1<r2} 0test_expr expr-4.12 {r1='abc', r2='Abc'} {r1>r2} 1test_expr expr-4.13 {r1='abc', r2='Bbc'} {r1<r2} 0test_expr expr-4.14 {r1='abc', r2='Bbc'} {r1>r2} 1test_expr expr-4.15 {r1='0', r2='0.0'} {r1==r2} 1test_expr expr-4.16 {r1='0.000', r2='0.0'} {r1==r2} 1test_expr expr-4.17 {r1=' 0.000', r2=' 0.0'} {r1==r2} 0test_expr expr-4.18 {r1='0.0', r2='abc'} {r1<r2} 1test_expr expr-4.19 {r1='0.0', r2='abc'} {r1==r2} 0test_expr expr-4.20 {r1='0.0', r2='abc'} {r1>r2} 0# CSL is true if LIKE is case sensitive and false if not.# NCSL is the opposite. Use these variables as the result# on operations where case makes a difference.set CSL $sqlite_options(casesensitivelike)set NCSL [expr {!$CSL}]test_expr expr-5.1 {t1='abc', t2='xyz'} {t1 LIKE t2} 0test_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} $CSL# 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} 0
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -