- Timestamp:
- Mar 11, 2012, 10:34:18 PM (12 years ago)
- Branches:
- release-1.8
- Children:
- 6a08f16
- Parents:
- 4a80a16
- git-author:
- David Benjamin <davidben@mit.edu> (01/23/12 00:38:29)
- git-committer:
- David Benjamin <davidben@mit.edu> (03/11/12 22:34:18)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tester.c
r67e5ba36 r34132f7 3 3 #include "owl.h" 4 4 #undef WINDOW 5 #include "filterproc.h" 5 6 6 7 #include <unistd.h> … … 26 27 int owl_smartfilter_regtest(void); 27 28 int owl_history_regtest(void); 29 int call_filter_regtest(void); 28 30 29 31 extern void owl_perl_xs_init(pTHX); … … 116 118 numfailures += owl_smartfilter_regtest(); 117 119 numfailures += owl_history_regtest(); 120 numfailures += call_filter_regtest(); 118 121 if (numfailures) { 119 122 fprintf(stderr, "# *** WARNING: %d failures total\n", numfailures); … … 982 985 return numfailed; 983 986 } 987 988 int call_filter_regtest(void) 989 { 990 int numfailed = 0; 991 int ret; 992 char *out = NULL; 993 int status; 994 995 printf("# BEGIN testing call_filter\n"); 996 997 const char *cat_argv[] = { "cat", NULL }; 998 ret = call_filter(cat_argv, "Mangos!", &out, &status); 999 FAIL_UNLESS("call_filter cat", (ret == 0 && 1000 status == 0 && 1001 strcmp(out, "Mangos!") == 0)); 1002 g_free(out); out = NULL; 1003 1004 ret = call_filter(cat_argv, "", &out, &status); 1005 FAIL_UNLESS("call_filter cat", (ret == 0 && 1006 status == 0 && 1007 strcmp(out, "") == 0)); 1008 g_free(out); out = NULL; 1009 1010 ret = call_filter(cat_argv, NULL, &out, &status); 1011 FAIL_UNLESS("call_filter cat", (ret == 0 && 1012 status == 0 && 1013 strcmp(out, "") == 0)); 1014 g_free(out); out = NULL; 1015 1016 printf("# END testing call_filter (%d failures)\n", numfailed); 1017 return numfailed; 1018 }
Note: See TracChangeset
for help on using the changeset viewer.