summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2019-10-28 12:57:17 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-10-29 03:38:34 (GMT)
commit3ce47211a6ecae0ebe241779ef7112ee21f04a74 (patch)
treea224c9de004a1a2ad061d31ed6e0696dc10aa62e /t
parent5fa0f5238b0cd46cfe7f6fa76c3f526ea98148d9 (diff)
downloadgit-3ce47211a6ecae0ebe241779ef7112ee21f04a74.zip
git-3ce47211a6ecae0ebe241779ef7112ee21f04a74.tar.gz
git-3ce47211a6ecae0ebe241779ef7112ee21f04a74.tar.bz2
t1400: wrap setup code in test case
Without this, you cannot use `--run=<...>` to skip that part, and a run with `--run=0` (which is a common way to determine the test case number corresponding to a given test case title). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t1400-update-ref.sh18
1 files changed, 10 insertions, 8 deletions
diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh
index 1fbd940..69a7f27 100755
--- a/t/t1400-update-ref.sh
+++ b/t/t1400-update-ref.sh
@@ -344,14 +344,16 @@ test_expect_success "verifying $m's log (logged by config)" '
test_cmp expect .git/logs/$m
'
-git update-ref $m $D
-cat >.git/logs/$m <<EOF
-$Z $C $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150320 -0500
-$C $A $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150350 -0500
-$A $B $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150380 -0500
-$F $Z $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150680 -0500
-$Z $E $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150980 -0500
-EOF
+test_expect_success 'set up for querying the reflog' '
+ git update-ref $m $D &&
+ cat >.git/logs/$m <<-EOF
+ $Z $C $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150320 -0500
+ $C $A $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150350 -0500
+ $A $B $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150380 -0500
+ $F $Z $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150680 -0500
+ $Z $E $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150980 -0500
+ EOF
+'
ed="Thu, 26 May 2005 18:32:00 -0500"
gd="Thu, 26 May 2005 18:33:00 -0500"