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