@matheusbsbs / matheus-bagliano / commits / 3ce47211a6
Fork 0

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>

Johannes Schindelin committed Oct 28, 2019 at 12:57 UTC 3ce47211a6ecae0ebe241779ef7112ee21f04a74
1 file changed +10 -8
t/t1400-update-ref.sh
+10 -8
@@ -344,14 +344,16 @@ test_expect_success "verifying $m's log (logged by config)" '
344 test_cmp expect .git/logs/$m
345 '
346
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 +'
357
358 ed="Thu, 26 May 2005 18:32:00 -0500"
359 gd="Thu, 26 May 2005 18:33:00 -0500"