| 177 | } |
| 178 | |
| 179 | static void test_strcspn(void **state) |
| 180 | { |
| 181 | char str[] = "12340000"; |
| 182 | char str2[] = "00001234"; |
| 183 | char str3[] = "1234"; |
| 184 | |
| 185 | assert_int_equal(0, strcspn(str, str3)); |
| 186 | assert_int_equal(4, strcspn(str2, str3)); |
| 187 | } |
| 188 | |
| 189 | /* Please bear in mind that `atol()` uses `strspn()` internally, so the result |
| 190 | of `test_atol` is dependent on the result of `test_strspn`. */ |