git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH/RFC] t0060: basename("//") is implementation defined
@ 2016-01-13 20:56 tboegi
  2016-01-13 21:16 ` Junio C Hamano
  2016-01-14  7:00 ` Johannes Schindelin
  0 siblings, 2 replies; 4+ messages in thread
From: tboegi @ 2016-01-13 20:56 UTC (permalink / raw)
  To: tboegi, git

From: Torsten Bögershausen <tboegi@web.de>

From
http://pubs.opengroup.org/onlinepubs/9699919799/functions/basename.html
basename("//") may return either "//" or "/".

Linux returns "/", some systems like Mac OS X return "//".
Skip the test unless NO_LIBGEN_H is set and gitbasename() from
compat/basename is used.

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
---
My version of a hot fix
 test-path-utils.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/test-path-utils.c b/test-path-utils.c
index 4ab68ac..db0bb39 100644
--- a/test-path-utils.c
+++ b/test-path-utils.c
@@ -142,7 +142,9 @@ static struct test_data dirname_data[] = {
 	{ ".",               "."      },
 	{ "..",              "."      },
 	{ "/",               "/"      },
+#if defined(NO_LIBGEN_H)
 	{ "//",              "//"     },
+#endif
 #if defined(__CYGWIN__) && !defined(NO_LIBGEN_H)
 	{ "///",             "//"     },
 	{ "////",            "//"     },
-- 
2.7.0.278.g9379adb.dirty

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-01-14 11:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-13 20:56 [PATCH/RFC] t0060: basename("//") is implementation defined tboegi
2016-01-13 21:16 ` Junio C Hamano
2016-01-14  7:00 ` Johannes Schindelin
2016-01-14 11:47   ` Torsten Bögershausen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).