From: Jim Meyering Date: Mon, 24 Sep 2007 11:43:03 +0000 (+0200) Subject: filenamecat.c: Add a test. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=de546cfa0da62fb1e5a43040a4a34da55021af9b;p=pspp filenamecat.c: Add a test. * lib/filenamecat.c (main) [TEST_FILE_NAME_CONCAT]: Add a test showing how the function works when DIR is the empty string. --- diff --git a/ChangeLog b/ChangeLog index e288a8dea9..1c0c1a7c30 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-09-24 Jim Meyering + + filenamecat.c: Add a test. + * lib/filenamecat.c (main) [TEST_FILE_NAME_CONCAT]: Add a test + showing how the function works when DIR is the empty string. + 2007-09-21 Simon Josefsson * tests/test-canonicalize.sh: Turn on executable bit. diff --git a/lib/filenamecat.c b/lib/filenamecat.c index beac5c1853..3baf183dd5 100644 --- a/lib/filenamecat.c +++ b/lib/filenamecat.c @@ -121,6 +121,7 @@ main () {"a", "/", "a/"}, /* this might deserve a diagnostic */ {"/a", "/", "/a/"}, /* this might deserve a diagnostic */ {"a", "//b", "a/b"}, + {"", "a", "a"}, /* this might deserve a diagnostic */ }; size_t i; bool fail = false;