daveb
committed
on 13 Nov 06
Add test for NOT with no search terms
/test/tsearch2-driver-procs.tcl (+5 -1)
30 30             aa_true "Multiple terms automatic AND, explicit OR '[tsearch2::build_query -query $q]'" \
31 31                 [string equal "openacs & test | automated" \
32 32                      [tsearch2::build_query -query $q]]
33 33             set q "(openacs test) or automated"
34 34             aa_true "Multiple terms grouped '[tsearch2::build_query -query $q]'" \
35 35                 [string equal "(openacs & test) | automated" \
36 36                      [tsearch2::build_query -query $q]]
37 37             set q "(openacs or test) automated"
38 38             aa_true "Multiple terms grouped automatic AND '[tsearch2::build_query -query $q]'" \
39 39                 [string equal "(openacs | test) & automated" \
40 40                      [tsearch2::build_query -query $q]]
41 41             set q "one a two"
42 42             aa_true "Single letter elements" \
43 43                 [string equal "one & a & two" \
44 44                      [tsearch2::build_query -query $q]]
45 45
46 46             set q "or else"
47 47             aa_true "Or at beginning by itself" \
48 48                 [string equal "else" \
49 49                      [tsearch2::build_query -query $q]]
  50             set q "not"
  51             aa_true "Not all alone" \
  52                 [string equal "" \
  53                      [tsearch2::build_query -query $q]]
50 54         }
51 55 }