| | @@ -861,11 +861,11 @@ |
| 861 | 861 | test th1-info-commands-1 {$RESULT eq {linecount htmlize date stime\ |
| 862 | 862 | enable_output uplevel http expr utime styleFooter catch if tclReady\ |
| 863 | 863 | searchable reinitialize combobox lindex query html anoncap randhex\ |
| 864 | 864 | llength for set break regexp styleHeader puts return checkout decorate\ |
| 865 | 865 | artifact trace wiki proc hascap globalState continue getParameter\ |
| 866 | | -hasfeature setting breakpoint upvar render repository string unset\ |
| 866 | +hasfeature setting lsearch breakpoint upvar render repository string unset\ |
| 867 | 867 | setParameter list error info rename anycap httpize}} |
| 868 | 868 | |
| 869 | 869 | ############################################################################### |
| 870 | 870 | |
| 871 | 871 | fossil test-th-eval "info vars" |
| | @@ -888,5 +888,58 @@ |
| 888 | 888 | |
| 889 | 889 | ############################################################################### |
| 890 | 890 | |
| 891 | 891 | fossil test-th-eval "set y 1; proc foo {} {set x 1; uplevel 1 {info vars}}; foo" |
| 892 | 892 | test th1-info-vars-5 {$RESULT eq "y"} |
| 893 | + |
| 894 | +############################################################################### |
| 895 | + |
| 896 | +fossil test-th-eval "lsearch" |
| 897 | +test th1-lsearch-1 {$RESULT eq \ |
| 898 | + {TH_ERROR: wrong # args: should be "lsearch list string"}} |
| 899 | + |
| 900 | +############################################################################### |
| 901 | + |
| 902 | +fossil test-th-eval "lsearch a" |
| 903 | +test th1-lsearch-2 {$RESULT eq \ |
| 904 | + {TH_ERROR: wrong # args: should be "lsearch list string"}} |
| 905 | + |
| 906 | +############################################################################### |
| 907 | + |
| 908 | +fossil test-th-eval "lsearch a a a" |
| 909 | +test th1-lsearch-3 {$RESULT eq \ |
| 910 | + {TH_ERROR: wrong # args: should be "lsearch list string"}} |
| 911 | + |
| 912 | +############################################################################### |
| 913 | + |
| 914 | +fossil test-th-eval "lsearch {a b c} a" |
| 915 | +test th1-lsearch-4 {$RESULT eq "0"} |
| 916 | + |
| 917 | +############################################################################### |
| 918 | + |
| 919 | +fossil test-th-eval "lsearch {a b c} b" |
| 920 | +test th1-lsearch-5 {$RESULT eq "1"} |
| 921 | + |
| 922 | +############################################################################### |
| 923 | + |
| 924 | +fossil test-th-eval "lsearch {a b c} c" |
| 925 | +test th1-lsearch-6 {$RESULT eq "2"} |
| 926 | + |
| 927 | +############################################################################### |
| 928 | + |
| 929 | +fossil test-th-eval "lsearch {a b c} d" |
| 930 | +test th1-lsearch-7 {$RESULT eq "-1"} |
| 931 | + |
| 932 | +############################################################################### |
| 933 | + |
| 934 | +fossil test-th-eval "lsearch {a b c} aa" |
| 935 | +test th1-lsearch-8 {$RESULT eq "-1"} |
| 936 | + |
| 937 | +############################################################################### |
| 938 | + |
| 939 | +fossil test-th-eval "lsearch {aa b c} a" |
| 940 | +test th1-lsearch-9 {$RESULT eq "-1"} |
| 941 | + |
| 942 | +############################################################################### |
| 943 | + |
| 944 | +fossil test-th-eval "lsearch \"\{aa b c\" a" |
| 945 | +test th1-lsearch-10 {$RESULT eq "TH_ERROR: Expected list, got: \"\{aa b c\""} |
| 893 | 946 | |