summaryrefslogtreecommitdiffabout
path: root/tests
Unidiff
Diffstat (limited to 'tests') (more/less context) (ignore whitespace changes)
-rw-r--r--tests/wsbatch.c12
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
@@ -42,13 +42,14 @@ runtest (const char **input, struct wordsplit *wsinit, int flags)
42 count++; 42 count++;
43 if (wordsplit (text, &ws, flags)) 43 if (wordsplit (text, &ws, flags))
44 { 44 {
45 fprintf (stderr, "E: %s: parse failed\n", input); 45 fprintf (stderr, "E: %s: parse failed\n", text);
46 errors++; 46 errors++;
47 } 47 }
48 else if (ws.ws_wordc != j) 48 else if (ws.ws_wordc != j)
49 { 49 {
50 fprintf (stderr, "E: %s: wrong number of fields (%lu/%lu)\n", 50 fprintf (stderr, "E: %s: wrong number of fields (%lu/%lu)\n",
51 text, ws.ws_wordc, j); 51 text,
52 (unsigned long) ws.ws_wordc, (unsigned long) j);
52 errors++; 53 errors++;
53 } 54 }
54 else 55 else
@@ -59,7 +60,8 @@ runtest (const char **input, struct wordsplit *wsinit, int flags)
59 if (strcmp (ws.ws_wordv[k], input[i + k])) 60 if (strcmp (ws.ws_wordv[k], input[i + k]))
60 { 61 {
61 fprintf (stderr, "E: %s: word %lu mismatch: %s/%s\n", 62 fprintf (stderr, "E: %s: word %lu mismatch: %s/%s\n",
62 text, k, ws.ws_wordv[k], input[i + k]); 63 text, (unsigned long) k,
64 ws.ws_wordv[k], input[i + k]);
63 errors++; 65 errors++;
64 break; 66 break;
65 } 67 }
@@ -138,9 +140,9 @@ main ()
138 runtest (testcol2, &ws, 140 runtest (testcol2, &ws,
139 WRDSF_NOVAR | WRDSF_NOCMD | WRDSF_DELIM | WRDSF_RETURN_DELIMS); 141 WRDSF_NOVAR | WRDSF_NOCMD | WRDSF_DELIM | WRDSF_RETURN_DELIMS);
140 142
141 printf ("Tests: %lu\n", count); 143 printf ("Tests: %lu\n", (unsigned long) count);
142 if (errors) 144 if (errors)
143 printf ("Failures: %lu\n", errors); 145 printf ("Failures: %lu\n", (unsigned long) errors);
144 return errors ? 1 : 0; 146 return errors ? 1 : 0;
145} 147}
146 148

Return to:

Send suggestions and report system problems to the System administrator.