summaryrefslogtreecommitdiff
path: root/t/t4018/cpp-struct-single-line
diff options
context:
space:
mode:
authorLibravatar brian m. carlson <sandals@crustytoothpaste.net>2019-11-27 19:01:42 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-11-30 14:00:33 -0800
commitc64368e3a2a4749d71b703ae31dee6e451a80f54 (patch)
tree1623f33733412f6f082fbff820503dd72b4808bd /t/t4018/cpp-struct-single-line
parentGit 2.23 (diff)
downloadtgif-c64368e3a2a4749d71b703ae31dee6e451a80f54.tar.xz
t9001: avoid including non-trailing NUL bytes in variables
In this test, we have a command substitution whose output starts with a NUL byte. bash and dash strip out any NUL bytes from the output; zsh does not. As a consequence, zsh fails this test, since the command line argument we use the variable in is truncated by the NUL byte. POSIX says of a command substitution that if "the output contains any null bytes, the behavior is unspecified," so all of the shells are in compliance with POSIX. To make our code more portable, let's avoid prefacing our variables with NUL bytes and instead leave only the trailing one behind. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4018/cpp-struct-single-line')
0 files changed, 0 insertions, 0 deletions