Re: [PATCH/RFC] t0060: basename("//") is implementation defined

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tboegi@xxxxxx writes:

> From: Torsten Bögershausen <tboegi@xxxxxx>
>
> 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@xxxxxx>
> ---
> My version of a hot fix
>  test-path-utils.c | 2 ++
>  1 file changed, 2 insertions(+)

Thanks.  Ramsay gave a nice analysis at

  http://thread.gmane.org/gmane.comp.version-control.git/283928

and Dscho already is working on it, IIUC, in a slightly different
direction.

> 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)
>  	{ "///",             "//"     },
>  	{ "////",            "//"     },
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]