/* test local files ----------------------------------------------------------*/ static int test_locals(gtime_t ts, gtime_t te, double ti, const url_t *url, char **stas, int nsta, const char *dir, int *nc, int *nt, FILE *fp) { int i; if (strstr(url->path,"%s")||strstr(url->path,"%S")) { fprintf(fp,"%s\n",url->type); for (i=0;i<nsta;i++) { fprintf(fp,"%-12s:",stas[i]); if (test_local(ts,te,ti,url->path,stas[i],*dir?dir:url->dir,nc+i, nt+i,fp)) { return 1; } } } else { fprintf(fp,"%-12s:",url->type); if (test_local(ts,te,ti,url->path,"",*dir?dir:url->dir,nc,nt,fp)) { return 1; } } return 0; }
int main (int argc, char *argv[]) { test_new (); test_alloc (); test_realloc (); test_free (); test_discard (); test_ref (); test_unref (); test_parent (); test_local (); return 0; }
int main() { if (test_replace()==0 && test_replace_any()==0 && test_trim_left()==0 && test_trim_right()==0 && test_trim()==0 && test_str2hex()==0 && test_split()==0 && test_split_first()==0 && test_split_second()==0 && test_vexec()==0 && test_json_set()==0 && test_hash()==0 && test_random()==0 && test_local()==0 ) { std::cout << "Success" << std::endl; return EXIT_SUCCESS; } else { std::cerr << "Fail" << std::endl; return EXIT_FAILURE; } }