Skip to content

Commit d38722e

Browse files
avargitster
authored andcommitted
tests: avoid syntax triggering old dash bug
Avoid a bug in dash that's been fixed ever since its ec2c84d ("[PARSER] Fix clobbering of checkkwd", 2011-03-15)[1] first released with dash v0.5.7 in July 2011. This failing test was introduced in 5f96742 ("config: add --expiry-date", 2017-11-18). This fixes 1/2 tests failing on Debian Lenny & Squeeze. The other failure is due to 1b42f45 ("git-svn: apply "svn.pathnameencoding" before URL encoding", 2016-02-09). The dash bug is triggered by this test because the heredoc contains a command embedded in "$()" with a "{}" block coming right after it. Refactoring the "$()" to e.g. be a variable that was set earlier will also work around it, but let's instead break up the "EOF" and the "{}". An earlier version of this patch[2] mitigated the issue by breaking the "$()" out of the "{}" block, that worked, but just because it broke up the "EOF" and "{}" block. Putting e.g. "echo &&" between the two would also work. 1. https://git.kernel.org/pub/scm/utils/dash/dash.git/ 2. https://public-inbox.org/git/[email protected]/ Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 0d0ac38 commit d38722e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

t/t1300-config.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -892,6 +892,7 @@ test_expect_success 'get --expiry-date' '
892892
1510348087
893893
0
894894
EOF
895+
: "work around heredoc parsing bug fixed in dash 0.5.7 (in ec2c84d)" &&
895896
{
896897
echo "$rel_out $(git config --expiry-date date.valid1)"
897898
git config --expiry-date date.valid2 &&

0 commit comments

Comments
 (0)