diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2016-01-14 07:48:27 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-01-15 09:26:20 -0800 |
commit | 371471cea38cb4b5834c9e5715e1fe633829004f (patch) | |
tree | 41445d44e42f9ed1b37b3387713793eae73db0c5 /Documentation/git-verify-commit.txt | |
parent | t0060: verify that basename() and dirname() work as expected (diff) | |
download | tgif-371471cea38cb4b5834c9e5715e1fe633829004f.tar.xz |
t0060: loosen overly strict expectations
The dirname() tests file were developed and tested on only the five
platforms available to the developer at the time, namely: Linux (both 32
and 64bit), Windows XP 32-bit (MSVC), MinGW 32-bit and Cygwin 32-bit.
http://pubs.opengroup.org/onlinepubs/9699919799/functions/basename.html
(i.e. the POSIX spec) says, in part:
If the string pointed to by path consists entirely of the '/'
character, basename() shall return a pointer to the string "/".
If the string pointed to by path is exactly "//", it is
implementation-defined whether "/" or "//" is returned.
The thinking behind testing precise, OS-dependent output values was to
document that different setups produce different values. However, as the
test failures on MacOSX illustrated eloquently: hardcoding pretty much each
and every setup's expectations is pretty fragile.
This is not limited to the "//" vs "/" case, of course, other inputs are
also allowed to produce multiple outputs by the POSIX specs.
So let's just test for all allowed values and be done with it. This still
documents that Git cannot rely on one particular output value in those
cases, so the intention of the original tests is still met.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-verify-commit.txt')
0 files changed, 0 insertions, 0 deletions