From: dan Date: Thu, 14 Jan 2010 11:45:03 +0000 (+0000) Subject: Add a test to e_fts3.test for the matchinfo example in fts3.html. X-Git-Tag: version-3.7.2~635 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0153c35db59034f4aa8a488140944f02ba132cc5;p=thirdparty%2Fsqlite.git Add a test to e_fts3.test for the matchinfo example in fts3.html. FossilOrigin-Name: e5336edc55313afac11ea085257cb6e75a0287a7 --- diff --git a/manifest b/manifest index b196204986..bc8d87b9a6 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\ssome\smatchinfo\srelated\stest\sproblems\sin\sfts3rnd.test. -D 2010-01-14T11:17:05 +C Add\sa\stest\sto\se_fts3.test\sfor\sthe\smatchinfo\sexample\sin\sfts3.html. +D 2010-01-14T11:45:04 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0 F Makefile.in c5827ead754ab32b9585487177c93bb00b9497b3 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654 @@ -326,7 +326,7 @@ F test/descidx3.test 3394ad4d089335cac743c36a14129d6d931c316f F test/diskfull.test 0cede7ef9d8f415d9d3944005c76be7589bb5ebb F test/distinctagg.test 1a6ef9c87a58669438fc771450d7a72577417376 F test/e_fkey.test 6721a741c6499b3ab7e5385923233343c8f1ad05 -F test/e_fts3.test e95c2085c817ebb929c85773394d5fb250a8f610 +F test/e_fts3.test 5adb033fae6e07002d11f4a7c8f8e8ff9f31e8ec F test/enc.test e54531cd6bf941ee6760be041dff19a104c7acea F test/enc2.test 6d91a5286f59add0cfcbb2d0da913b76f2242398 F test/enc3.test 5c550d59ff31dccdba5d1a02ae11c7047d77c041 @@ -785,7 +785,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f -P 67c3aea563e019083f0ed87b57982a0379637d4f -R 8e69825ad6823779e3340d8c7cfb5e0a +P da7abe05887d1ad52552d8ce3a153a0a76f96c5a +R 5042b01c82f71d4627ff255b6d524663 U dan -Z b7d555c32c5b8aefdf64aab0d007e815 +Z 872dd4d3d7fbe754f123dcb0fa0c8e61 diff --git a/manifest.uuid b/manifest.uuid index e2d2161f58..ef9357e7de 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -da7abe05887d1ad52552d8ce3a153a0a76f96c5a \ No newline at end of file +e5336edc55313afac11ea085257cb6e75a0287a7 \ No newline at end of file diff --git a/test/e_fts3.test b/test/e_fts3.test index 21537677b9..6a14d50d96 100644 --- a/test/e_fts3.test +++ b/test/e_fts3.test @@ -65,6 +65,14 @@ sqlite3 db test.db if {$DO_MALLOC_TEST} { sqlite3_db_config_lookaside db 0 0 0 } db eval "PRAGMA encoding = '$enc'" +proc mit {blob} { + set scan(littleEndian) i* + set scan(bigEndian) I* + binary scan $blob $scan($::tcl_platform(byteOrder)) r + return $r +} +db func mit mit + ########################################################################## # Test the example CREATE VIRTUAL TABLE statements in section 1.1 # of fts3.in. @@ -425,6 +433,23 @@ read_test 1.7.2.4 { SELECT snippet(text, '[', ']', '...') FROM text WHERE text MATCH '"min* tem*"' } {{...the upper portion, [minimum] [temperature] 14-16oC and cool elsewhere, [minimum] [temperature] 17-20oC. Cold...}} +ddl_test 1.7.3.1 { DROP TABLE IF EXISTS t1 } +ddl_test 1.7.3.2 { CREATE VIRTUAL TABLE t1 USING fts3(a, b) } +write_test 1.7.3.3 t1_content { + INSERT INTO t1 VALUES( + 'transaction default models default', 'Non transaction reads'); +} +write_test 1.7.3.4 t1_content { + INSERT INTO t1 VALUES('the default transaction', 'these semantics present'); +} +write_test 1.7.3.5 t1_content { + INSERT INTO t1 VALUES('single request', 'default data'); +} +read_test 1.7.3.6 { + SELECT mit(matchinfo(t1)) FROM t1 + WHERE t1 MATCH 'default transaction "these semantics"'; +} {{3 2 1 3 2 0 1 1 1 2 2 0 1 1 0 0 0 1 1 1}} + ########################################################################## # Test the example in section 5 (custom tokenizers). # @@ -452,6 +477,7 @@ read_test 1.8.2.4 { # functions are handled correctly. # set DO_MALLOC_TEST 0 +ddl_test 2.1.0 { DROP TABLE IF EXISTS t1 } ddl_test 2.1.1 { CREATE VIRTUAL TABLE t1 USING fts3(a, b) } write_test 2.1.2 t1_content { INSERT INTO t1 VALUES('one two three', x'A1B2C3D4E5F6');