(t *testing.T)
| 164 | } |
| 165 | |
| 166 | func TestIsNonDateString(t *testing.T) { |
| 167 | testCases := []struct { |
| 168 | name string |
| 169 | input string |
| 170 | output bool |
| 171 | }{ |
| 172 | { |
| 173 | name: "ZenTao long-term in Chinese", |
| 174 | input: "长期", |
| 175 | output: true, |
| 176 | }, |
| 177 | { |
| 178 | name: "ZenTao long-term in Unicode escape", |
| 179 | input: "\\u957f\\u671f", |
| 180 | output: true, |
| 181 | }, |
| 182 | { |
| 183 | name: "ZenTao long-term in double-escaped Unicode", |
| 184 | input: "\\\\u957f\\\\u671f", |
| 185 | output: true, |
| 186 | }, |
| 187 | { |
| 188 | name: "English long-term", |
| 189 | input: "long-term", |
| 190 | output: true, |
| 191 | }, |
| 192 | { |
| 193 | name: "Chinese permanent", |
| 194 | input: "永久", |
| 195 | output: true, |
| 196 | }, |
| 197 | { |
| 198 | name: "English indefinite", |
| 199 | input: "indefinite", |
| 200 | output: true, |
| 201 | }, |
| 202 | { |
| 203 | name: "English unlimited", |
| 204 | input: "unlimited", |
| 205 | output: true, |
| 206 | }, |
| 207 | { |
| 208 | name: "Valid date string", |
| 209 | input: "2023-03-01", |
| 210 | output: false, |
| 211 | }, |
| 212 | { |
| 213 | name: "Valid datetime string", |
| 214 | input: "2023-03-01T12:30:00Z", |
| 215 | output: false, |
| 216 | }, |
| 217 | { |
| 218 | name: "Random string", |
| 219 | input: "random", |
| 220 | output: false, |
| 221 | }, |
| 222 | } |
| 223 | for _, tc := range testCases { |
nothing calls this directly
no test coverage detected