Skip to content

Commit cf97c51

Browse files
committed
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 <[email protected]>
1 parent 108b97d commit cf97c51

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

t/t1400-update-ref.sh

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -344,14 +344,16 @@ test_expect_success "verifying $m's log (logged by config)" '
344344
test_cmp expect .git/logs/$m
345345
'
346346

347-
git update-ref $m $D
348-
cat >.git/logs/$m <<EOF
349-
$Z $C $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150320 -0500
350-
$C $A $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150350 -0500
351-
$A $B $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150380 -0500
352-
$F $Z $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150680 -0500
353-
$Z $E $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150980 -0500
354-
EOF
347+
test_expect_success 'set up for querying the reflog' '
348+
git update-ref $m $D &&
349+
cat >.git/logs/$m <<-EOF
350+
$Z $C $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150320 -0500
351+
$C $A $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150350 -0500
352+
$A $B $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150380 -0500
353+
$F $Z $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150680 -0500
354+
$Z $E $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150980 -0500
355+
EOF
356+
'
355357

356358
ed="Thu, 26 May 2005 18:32:00 -0500"
357359
gd="Thu, 26 May 2005 18:33:00 -0500"

0 commit comments

Comments
 (0)