fts5multiclient.test 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # 2016 March 17
  2. #
  3. # The author disclaims copyright to this source code. In place of
  4. # 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. #
  12. source [file join [file dirname [info script]] fts5_common.tcl]
  13. source $testdir/lock_common.tcl
  14. set testprefix fts5multiclient
  15. return_if_no_fts5
  16. foreach_detail_mode $testprefix {
  17. do_multiclient_test tn {
  18. do_test 1.$tn.1 {
  19. sql1 { CREATE VIRTUAL TABLE t1 USING fts5(x, detail=%DETAIL%) }
  20. sql1 { INSERT INTO t1 VALUES('a b c') }
  21. sql2 { SELECT rowid FROM t1('b') }
  22. } {1}
  23. do_test 1.$tn.2 {
  24. sql2 { INSERT INTO t1 VALUES('a b c') }
  25. sql1 { SELECT rowid FROM t1('b') }
  26. } {1 2}
  27. do_test 1.$tn.3 {
  28. sql2 { INSERT INTO t1 VALUES('a b c') }
  29. sql1 { SELECT rowid FROM t1('b') }
  30. } {1 2 3}
  31. do_test 1.$tn.4 {
  32. sql2 { INSERT INTO t1 VALUES('a b c') }
  33. sql1 { INSERT INTO t1 VALUES('a b c') }
  34. sql3 { INSERT INTO t1(t1) VALUES('integrity-check') }
  35. } {}
  36. };# do_multiclient_test
  37. };# foreach_detail_mode
  38. finish_test