diff options
-rw-r--r-- | tests/wsbatch.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/wsbatch.c b/tests/wsbatch.c index 5d986db..372c3ba 100644 --- a/tests/wsbatch.c +++ b/tests/wsbatch.c @@ -39,30 +39,32 @@ runtest (const char **input, struct wordsplit *wsinit, int flags) i++; for (j = 0; input[i+j]; j++); count++; if (wordsplit (text, &ws, flags)) { - fprintf (stderr, "E: %s: parse failed\n", input); + fprintf (stderr, "E: %s: parse failed\n", text); errors++; } else if (ws.ws_wordc != j) { fprintf (stderr, "E: %s: wrong number of fields (%lu/%lu)\n", - text, ws.ws_wordc, j); + text, + (unsigned long) ws.ws_wordc, (unsigned long) j); errors++; } else { size_t k; for (k = 0; k < ws.ws_wordc; k++) if (strcmp (ws.ws_wordv[k], input[i + k])) { fprintf (stderr, "E: %s: word %lu mismatch: %s/%s\n", - text, k, ws.ws_wordv[k], input[i + k]); + text, (unsigned long) k, + ws.ws_wordv[k], input[i + k]); errors++; break; } } i += j; } @@ -135,12 +137,12 @@ main () runtest (testcol, &ws, WRDSF_NOVAR | WRDSF_NOCMD | WRDSF_DELIM); ws.ws_delim = " =,"; runtest (testcol2, &ws, WRDSF_NOVAR | WRDSF_NOCMD | WRDSF_DELIM | WRDSF_RETURN_DELIMS); - printf ("Tests: %lu\n", count); + printf ("Tests: %lu\n", (unsigned long) count); if (errors) - printf ("Failures: %lu\n", errors); + printf ("Failures: %lu\n", (unsigned long) errors); return errors ? 1 : 0; } |