summaryrefslogtreecommitdiffabout
path: root/tests
authorSergey Poznyakoff <gray@gnu.org.ua>2009-11-30 10:41:12 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2009-11-30 10:41:12 (GMT)
commit4c68f93c0c664e13a8572b43e33c138ce3bb8d28 (patch) (side-by-side diff)
tree626d0381fec6759a51b060ca4478002d7f935aca /tests
parentd72e8be5e16ce4f4a87e43a4e764b534292aacc1 (diff)
downloadwydawca-4c68f93c0c664e13a8572b43e33c138ce3bb8d28.tar.gz
wydawca-4c68f93c0c664e13a8572b43e33c138ce3bb8d28.tar.bz2
Minor fixes.
* tests/wsbatch.c: Fix diagnostics.
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)
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
@@ -59,7 +60,8 @@ runtest (const char **input, struct wordsplit *wsinit, int flags)
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;
}
@@ -138,9 +140,9 @@ main ()
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;
}

Return to:

Send suggestions and report system problems to the System administrator.