Fossil SCM
Add tests.
Commit
0739e5b59d8516867f803ddf3aeabc8f01d2c9ba
Parent
f7d4c544cad47c8…
1 file changed
+74
-2
+74
-2
| --- test/th1.test | ||
| +++ test/th1.test | ||
| @@ -856,13 +856,14 @@ | ||
| 856 | 856 | # |
| 857 | 857 | # NOTE: This test may fail if the command names do not always come |
| 858 | 858 | # out in a deterministic order from TH1. |
| 859 | 859 | # |
| 860 | 860 | fossil test-th-eval "info commands" |
| 861 | +puts $RESULT | |
| 861 | 862 | test th1-info-commands-1 {$RESULT eq {linecount htmlize date stime\ |
| 862 | -enable_output uplevel http expr utime styleFooter catch if tclReady\ | |
| 863 | -searchable reinitialize combobox lindex query html anoncap randhex\ | |
| 863 | +enable_output uplevel http expr glob_match utime styleFooter catch if\ | |
| 864 | +tclReady searchable reinitialize combobox lindex query html anoncap randhex\ | |
| 864 | 865 | llength for set break regexp styleHeader puts return checkout decorate\ |
| 865 | 866 | artifact trace wiki proc hascap globalState continue getParameter\ |
| 866 | 867 | hasfeature setting breakpoint upvar render repository string unset\ |
| 867 | 868 | setParameter list error info rename anycap httpize}} |
| 868 | 869 | |
| @@ -888,5 +889,76 @@ | ||
| 888 | 889 | |
| 889 | 890 | ############################################################################### |
| 890 | 891 | |
| 891 | 892 | fossil test-th-eval "set y 1; proc foo {} {set x 1; uplevel 1 {info vars}}; foo" |
| 892 | 893 | test th1-info-vars-5 {$RESULT eq "y"} |
| 894 | + | |
| 895 | +############################################################################### | |
| 896 | + | |
| 897 | +fossil test-th-eval "glob_match" | |
| 898 | +test th1-glob-match-1 {$RESULT eq \ | |
| 899 | +{TH_ERROR: wrong # args: should be "glob_match ?-one? ?--? patternList string"}} | |
| 900 | + | |
| 901 | +############################################################################### | |
| 902 | + | |
| 903 | +fossil test-th-eval "glob_match -one" | |
| 904 | +test th1-glob-match-2 {$RESULT eq \ | |
| 905 | +{TH_ERROR: wrong # args: should be "glob_match ?-one? ?--? patternList string"}} | |
| 906 | + | |
| 907 | +############################################################################### | |
| 908 | + | |
| 909 | +fossil test-th-eval "glob_match --" | |
| 910 | +test th1-glob-match-3 {$RESULT eq \ | |
| 911 | +{TH_ERROR: wrong # args: should be "glob_match ?-one? ?--? patternList string"}} | |
| 912 | + | |
| 913 | +############################################################################### | |
| 914 | + | |
| 915 | +fossil test-th-eval "glob_match -one --" | |
| 916 | +test th1-glob-match-4 {$RESULT eq \ | |
| 917 | +{TH_ERROR: wrong # args: should be "glob_match ?-one? ?--? patternList string"}} | |
| 918 | + | |
| 919 | +############################################################################### | |
| 920 | + | |
| 921 | +fossil test-th-eval "glob_match -one -- 1" | |
| 922 | +test th1-glob-match-5 {$RESULT eq \ | |
| 923 | +{TH_ERROR: wrong # args: should be "glob_match ?-one? ?--? patternList string"}} | |
| 924 | + | |
| 925 | +############################################################################### | |
| 926 | + | |
| 927 | +fossil test-th-eval "glob_match -one -- 1 2 3" | |
| 928 | +test th1-glob-match-6 {$RESULT eq \ | |
| 929 | +{TH_ERROR: wrong # args: should be "glob_match ?-one? ?--? patternList string"}} | |
| 930 | + | |
| 931 | +############################################################################### | |
| 932 | + | |
| 933 | +fossil test-th-eval {list [glob_match a A] [glob_match A a]} | |
| 934 | +test th1-glob-match-7 {$RESULT eq "0 0"} | |
| 935 | + | |
| 936 | +############################################################################### | |
| 937 | + | |
| 938 | +fossil test-th-eval {list [glob_match a,b a] [glob_match a,b b]} | |
| 939 | +test th1-glob-match-8 {$RESULT eq "1 2"} | |
| 940 | + | |
| 941 | +############################################################################### | |
| 942 | + | |
| 943 | +fossil test-th-eval {list [glob_match -one a,b a] [glob_match -one a,b b]} | |
| 944 | +test th1-glob-match-9 {$RESULT eq "0 0"} | |
| 945 | + | |
| 946 | +############################################################################### | |
| 947 | + | |
| 948 | +fossil test-th-eval {list [glob_match -one a,b a,b] [glob_match -one a b,a]} | |
| 949 | +test th1-glob-match-10 {$RESULT eq "1 0"} | |
| 950 | + | |
| 951 | +############################################################################### | |
| 952 | + | |
| 953 | +fossil test-th-eval {list [glob_match a*c abc] [glob_match abc a*c]} | |
| 954 | +test th1-glob-match-11 {$RESULT eq "1 0"} | |
| 955 | + | |
| 956 | +############################################################################### | |
| 957 | + | |
| 958 | +fossil test-th-eval {list [glob_match a?c abc] [glob_match abc a?c]} | |
| 959 | +test th1-glob-match-12 {$RESULT eq "1 0"} | |
| 960 | + | |
| 961 | +############################################################################### | |
| 962 | + | |
| 963 | +fossil test-th-eval {list [glob_match {a[bd]c} abc] [glob_match abc {a[bd]c}]} | |
| 964 | +test th1-glob-match-13 {$RESULT eq "1 0"} | |
| 893 | 965 |
| --- test/th1.test | |
| +++ test/th1.test | |
| @@ -856,13 +856,14 @@ | |
| 856 | # |
| 857 | # NOTE: This test may fail if the command names do not always come |
| 858 | # out in a deterministic order from TH1. |
| 859 | # |
| 860 | fossil test-th-eval "info commands" |
| 861 | test th1-info-commands-1 {$RESULT eq {linecount htmlize date stime\ |
| 862 | enable_output uplevel http expr utime styleFooter catch if tclReady\ |
| 863 | searchable reinitialize combobox lindex query html anoncap randhex\ |
| 864 | llength for set break regexp styleHeader puts return checkout decorate\ |
| 865 | artifact trace wiki proc hascap globalState continue getParameter\ |
| 866 | hasfeature setting breakpoint upvar render repository string unset\ |
| 867 | setParameter list error info rename anycap httpize}} |
| 868 | |
| @@ -888,5 +889,76 @@ | |
| 888 | |
| 889 | ############################################################################### |
| 890 | |
| 891 | fossil test-th-eval "set y 1; proc foo {} {set x 1; uplevel 1 {info vars}}; foo" |
| 892 | test th1-info-vars-5 {$RESULT eq "y"} |
| 893 |
| --- test/th1.test | |
| +++ test/th1.test | |
| @@ -856,13 +856,14 @@ | |
| 856 | # |
| 857 | # NOTE: This test may fail if the command names do not always come |
| 858 | # out in a deterministic order from TH1. |
| 859 | # |
| 860 | fossil test-th-eval "info commands" |
| 861 | puts $RESULT |
| 862 | test th1-info-commands-1 {$RESULT eq {linecount htmlize date stime\ |
| 863 | enable_output uplevel http expr glob_match utime styleFooter catch if\ |
| 864 | tclReady searchable reinitialize combobox lindex query html anoncap randhex\ |
| 865 | llength for set break regexp styleHeader puts return checkout decorate\ |
| 866 | artifact trace wiki proc hascap globalState continue getParameter\ |
| 867 | hasfeature setting breakpoint upvar render repository string unset\ |
| 868 | setParameter list error info rename anycap httpize}} |
| 869 | |
| @@ -888,5 +889,76 @@ | |
| 889 | |
| 890 | ############################################################################### |
| 891 | |
| 892 | fossil test-th-eval "set y 1; proc foo {} {set x 1; uplevel 1 {info vars}}; foo" |
| 893 | test th1-info-vars-5 {$RESULT eq "y"} |
| 894 | |
| 895 | ############################################################################### |
| 896 | |
| 897 | fossil test-th-eval "glob_match" |
| 898 | test th1-glob-match-1 {$RESULT eq \ |
| 899 | {TH_ERROR: wrong # args: should be "glob_match ?-one? ?--? patternList string"}} |
| 900 | |
| 901 | ############################################################################### |
| 902 | |
| 903 | fossil test-th-eval "glob_match -one" |
| 904 | test th1-glob-match-2 {$RESULT eq \ |
| 905 | {TH_ERROR: wrong # args: should be "glob_match ?-one? ?--? patternList string"}} |
| 906 | |
| 907 | ############################################################################### |
| 908 | |
| 909 | fossil test-th-eval "glob_match --" |
| 910 | test th1-glob-match-3 {$RESULT eq \ |
| 911 | {TH_ERROR: wrong # args: should be "glob_match ?-one? ?--? patternList string"}} |
| 912 | |
| 913 | ############################################################################### |
| 914 | |
| 915 | fossil test-th-eval "glob_match -one --" |
| 916 | test th1-glob-match-4 {$RESULT eq \ |
| 917 | {TH_ERROR: wrong # args: should be "glob_match ?-one? ?--? patternList string"}} |
| 918 | |
| 919 | ############################################################################### |
| 920 | |
| 921 | fossil test-th-eval "glob_match -one -- 1" |
| 922 | test th1-glob-match-5 {$RESULT eq \ |
| 923 | {TH_ERROR: wrong # args: should be "glob_match ?-one? ?--? patternList string"}} |
| 924 | |
| 925 | ############################################################################### |
| 926 | |
| 927 | fossil test-th-eval "glob_match -one -- 1 2 3" |
| 928 | test th1-glob-match-6 {$RESULT eq \ |
| 929 | {TH_ERROR: wrong # args: should be "glob_match ?-one? ?--? patternList string"}} |
| 930 | |
| 931 | ############################################################################### |
| 932 | |
| 933 | fossil test-th-eval {list [glob_match a A] [glob_match A a]} |
| 934 | test th1-glob-match-7 {$RESULT eq "0 0"} |
| 935 | |
| 936 | ############################################################################### |
| 937 | |
| 938 | fossil test-th-eval {list [glob_match a,b a] [glob_match a,b b]} |
| 939 | test th1-glob-match-8 {$RESULT eq "1 2"} |
| 940 | |
| 941 | ############################################################################### |
| 942 | |
| 943 | fossil test-th-eval {list [glob_match -one a,b a] [glob_match -one a,b b]} |
| 944 | test th1-glob-match-9 {$RESULT eq "0 0"} |
| 945 | |
| 946 | ############################################################################### |
| 947 | |
| 948 | fossil test-th-eval {list [glob_match -one a,b a,b] [glob_match -one a b,a]} |
| 949 | test th1-glob-match-10 {$RESULT eq "1 0"} |
| 950 | |
| 951 | ############################################################################### |
| 952 | |
| 953 | fossil test-th-eval {list [glob_match a*c abc] [glob_match abc a*c]} |
| 954 | test th1-glob-match-11 {$RESULT eq "1 0"} |
| 955 | |
| 956 | ############################################################################### |
| 957 | |
| 958 | fossil test-th-eval {list [glob_match a?c abc] [glob_match abc a?c]} |
| 959 | test th1-glob-match-12 {$RESULT eq "1 0"} |
| 960 | |
| 961 | ############################################################################### |
| 962 | |
| 963 | fossil test-th-eval {list [glob_match {a[bd]c} abc] [glob_match abc {a[bd]c}]} |
| 964 | test th1-glob-match-13 {$RESULT eq "1 0"} |
| 965 |