Return true if the named test was selected using the -t command line * switch, or if all the tests are selected (no -t passed by user). */
| 1668 | /* Return true if the named test was selected using the -t command line |
| 1669 | * switch, or if all the tests are selected (no -t passed by user). */ |
| 1670 | int test_is_selected(char *name) { |
| 1671 | char buf[256]; |
| 1672 | int l = strlen(name); |
| 1673 | |
| 1674 | if (config.tests == NULL) return 1; |
| 1675 | buf[0] = ','; |
| 1676 | memcpy(buf+1,name,l); |
| 1677 | buf[l+1] = ','; |
| 1678 | buf[l+2] = '\0'; |
| 1679 | return strstr(config.tests,buf) != NULL; |
| 1680 | } |
| 1681 | |
| 1682 | int main(int argc, const char **argv) { |
| 1683 | int i; |