summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJehan <jehan@girinstud.io>2017-05-14 20:27:36 +0200
committerJehan <jehan@girinstud.io>2017-05-14 20:29:30 +0200
commit6cf13f108babe98150d8927f83ff34af5b51019e (patch)
tree2f14b2889e9dd3616bc9747e806ad06beb4cf9df
parent94b10b9b2946ddd222ccf5f08f873a0361eca976 (diff)
test: output the test file path which we failed to open.
Also properly free the string in such case.
-rw-r--r--test/uchardet-tests.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/uchardet-tests.c b/test/uchardet-tests.c
index 180ac15..b39c80c 100644
--- a/test/uchardet-tests.c
+++ b/test/uchardet-tests.c
@@ -100,7 +100,9 @@ main(int argc, char ** argv)
{
/* Error opening the test file. */
fprintf(stderr,
- "uchardet-tests: error opening the test file\n");
+ "uchardet-tests: error opening the test file \"%s\"\n",
+ filename);
+ free(filename);
return 1;
}