| | @@ -1012,5 +1012,99 @@ |
| 1012 | 1012 | |
| 1013 | 1013 | ############################################################################### |
| 1014 | 1014 | |
| 1015 | 1015 | fossil test-th-eval {list [glob_match {a[bd]c} abc] [glob_match abc {a[bd]c}]} |
| 1016 | 1016 | test th1-glob-match-13 {$RESULT eq "1 0"} |
| 1017 | + |
| 1018 | +############################################################################### |
| 1019 | + |
| 1020 | +fossil test-th-eval {string is} |
| 1021 | +test th1-string-is-1 {$RESULT eq \ |
| 1022 | +{TH_ERROR: wrong # args: should be "string is class string"}} |
| 1023 | + |
| 1024 | +############################################################################### |
| 1025 | + |
| 1026 | +fossil test-th-eval {string is something} |
| 1027 | +test th1-string-is-2 {$RESULT eq \ |
| 1028 | +{TH_ERROR: wrong # args: should be "string is class string"}} |
| 1029 | + |
| 1030 | +############################################################################### |
| 1031 | + |
| 1032 | +fossil test-th-eval {string is not something else} |
| 1033 | +test th1-string-is-3 {$RESULT eq \ |
| 1034 | +{TH_ERROR: wrong # args: should be "string is class string"}} |
| 1035 | + |
| 1036 | +############################################################################### |
| 1037 | + |
| 1038 | +fossil test-th-eval {string is other 123} |
| 1039 | +test th1-string-is-4 {$RESULT eq \ |
| 1040 | +"TH_ERROR: Expected alnum or list, got: other"} |
| 1041 | + |
| 1042 | +############################################################################### |
| 1043 | + |
| 1044 | +fossil test-th-eval {string is alnum 123} |
| 1045 | +test th1-string-is-5 {$RESULT eq "1"} |
| 1046 | + |
| 1047 | +############################################################################### |
| 1048 | + |
| 1049 | +fossil test-th-eval {string is alnum abc} |
| 1050 | +test th1-string-is-6 {$RESULT eq "1"} |
| 1051 | + |
| 1052 | +############################################################################### |
| 1053 | + |
| 1054 | +fossil test-th-eval {string is alnum 123abc} |
| 1055 | +test th1-string-is-7 {$RESULT eq "1"} |
| 1056 | + |
| 1057 | +############################################################################### |
| 1058 | + |
| 1059 | +fossil test-th-eval {string is alnum abc123} |
| 1060 | +test th1-string-is-8 {$RESULT eq "1"} |
| 1061 | + |
| 1062 | +############################################################################### |
| 1063 | + |
| 1064 | +fossil test-th-eval {string is alnum _abc123} |
| 1065 | +test th1-string-is-9 {$RESULT eq "0"} |
| 1066 | + |
| 1067 | +############################################################################### |
| 1068 | + |
| 1069 | +fossil test-th-eval {string is alnum abc.123} |
| 1070 | +test th1-string-is-10 {$RESULT eq "0"} |
| 1071 | + |
| 1072 | +############################################################################### |
| 1073 | + |
| 1074 | +fossil test-th-eval {string is alnum abc123_} |
| 1075 | +test th1-string-is-11 {$RESULT eq "0"} |
| 1076 | + |
| 1077 | +############################################################################### |
| 1078 | + |
| 1079 | +fossil test-th-eval {string is list ""} |
| 1080 | +test th1-string-is-12 {$RESULT eq "1"} |
| 1081 | + |
| 1082 | +############################################################################### |
| 1083 | + |
| 1084 | +fossil test-th-eval {string is list 1} |
| 1085 | +test th1-string-is-13 {$RESULT eq "1"} |
| 1086 | + |
| 1087 | +############################################################################### |
| 1088 | + |
| 1089 | +fossil test-th-eval {string is list "1 2 3"} |
| 1090 | +test th1-string-is-14 {$RESULT eq "1"} |
| 1091 | + |
| 1092 | +############################################################################### |
| 1093 | + |
| 1094 | +fossil test-th-eval {string is list "\{"} |
| 1095 | +test th1-string-is-15 {$RESULT eq "0"} |
| 1096 | + |
| 1097 | +############################################################################### |
| 1098 | + |
| 1099 | +fossil test-th-eval {string is list "1 2 3 \{"} |
| 1100 | +test th1-string-is-16 {$RESULT eq "0"} |
| 1101 | + |
| 1102 | +############################################################################### |
| 1103 | + |
| 1104 | +fossil test-th-eval {string is list "1 2 3 \{\}"} |
| 1105 | +test th1-string-is-17 {$RESULT eq "1"} |
| 1106 | + |
| 1107 | +############################################################################### |
| 1108 | + |
| 1109 | +fossil test-th-eval {string is list "1 2 3 \{\{\}"} |
| 1110 | +test th1-string-is-18 {$RESULT eq "0"} |
| 1017 | 1111 | |