summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2022-05-05 22:14:01 +0300
committerVille Skyttä <ville.skytta@iki.fi>2022-05-05 22:14:01 +0300
commit95e31875b257058e482342095c72050e4ed56ae3 (patch)
treeb5dfc9f9a298fe5a3ba0b11dffafc9ff67391c58
parentfe2f298fa691b225bdea31d816cf6728df91ba6d (diff)
test-mime-data: output errors to stderrfix/test-mime-data-stderr
-rw-r--r--src/test-mime-data.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/test-mime-data.c b/src/test-mime-data.c
index 29d0d47..c0bad3d 100644
--- a/src/test-mime-data.c
+++ b/src/test-mime-data.c
@@ -64,8 +64,8 @@ check_mime_type (const char *mt,
else
{
if (verbose > 0)
- printf ("%s, '%s' test: expected %s, got %s\n",
- filename, test, mt_expected, mt);
+ fprintf (stderr, "%s, '%s' test: expected %s, got %s\n",
+ filename, test, mt_expected, mt);
}
}
@@ -115,7 +115,7 @@ test_by_data (const char *dir,
if (file == NULL)
{
- printf ("Could not open %s\n", path);
+ fprintf (stderr, "Could not open %s\n", path);
error++;
return;
@@ -126,7 +126,7 @@ test_by_data (const char *dir,
if (data == NULL)
{
- printf ("Failed to allocate memory for file %s\n", filename);
+ fprintf (stderr, "Failed to allocate memory for file %s\n", filename);
error++;
fclose (file);
@@ -137,7 +137,7 @@ test_by_data (const char *dir,
if (ferror (file))
{
- printf ("Error reading file %s\n", path);
+ fprintf (stderr, "Error reading file %s\n", path);
error++;
free (data);
@@ -201,7 +201,7 @@ read_from_file (const char *filename)
if (file == NULL)
{
- printf ("Could not open %s\n", filename);
+ fprintf (stderr, "Could not open %s\n", filename);
exit (1);
}
@@ -218,7 +218,7 @@ read_from_file (const char *filename)
space = strchr (rest, ' ');
if (!space)
{
- printf ("Malformed line in %s:%d\n\t%s\n", filename, lineno, line);
+ fprintf (stderr, "Malformed line in %s:%d\n\t%s\n", filename, lineno, line);
continue;
}