changeset 9221:c97e282fa167

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.
author Jim Meyering <jim@meyering.net>
date Mon, 24 Sep 2007 13:43:03 +0200
parents 3a30bebb2dd3
children ff43652eebb5
files ChangeLog lib/filenamecat.c
diffstat 2 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-09-24  Jim Meyering  <jim@meyering.net>
+
+	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  <simon@josefsson.org>
 
 	* tests/test-canonicalize.sh: Turn on executable bit.
--- a/lib/filenamecat.c
+++ b/lib/filenamecat.c
@@ -121,6 +121,7 @@
       {"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;