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). */
| 1684 | /* Return true if the named test was selected using the -t command line |
| 1685 | * switch, or if all the tests are selected (no -t passed by user). */ |
| 1686 | int test_is_selected(const char *name) { |
| 1687 | char buf[256]; |
| 1688 | int l = strlen(name); |
| 1689 | |
| 1690 | if (config.tests == NULL) return 1; |
| 1691 | buf[0] = ','; |
| 1692 | memcpy(buf+1,name,l); |
| 1693 | buf[l+1] = ','; |
| 1694 | buf[l+2] = '\0'; |
| 1695 | return strstr(config.tests,buf) != NULL; |
| 1696 | } |
| 1697 | |
| 1698 | int main(int argc, const char **argv) { |
| 1699 | int i; |