From de546cfa0da62fb1e5a43040a4a34da55021af9b Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 24 Sep 2007 13:43:03 +0200 Subject: [PATCH] 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. --- ChangeLog | 6 ++++++ lib/filenamecat.c | 1 + 2 files changed, 7 insertions(+) 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; -- 2.30.2