Skip to content

Commit a52df25

Browse files
Martin Ågrengitster
authored andcommitted
t7900-maintenance: test for magic markers
When we insert our "BEGIN" and "END" markers into the cron table, it's so that a Git version from many years into the future would be able to identify this region in the cron table. Let's add a test to make sure that these markers don't ever change. Signed-off-by: Martin Ågren <[email protected]> Acked-by: Derrick Stolee <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 66dc0a3 commit a52df25

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

t/t7900-maintenance.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,15 @@ test_expect_success 'start preserves existing schedule' '
446446
grep "Important information!" cron.txt
447447
'
448448

449+
test_expect_success 'magic markers are correct' '
450+
grep "GIT MAINTENANCE SCHEDULE" cron.txt >actual &&
451+
cat >expect <<-\EOF &&
452+
# BEGIN GIT MAINTENANCE SCHEDULE
453+
# END GIT MAINTENANCE SCHEDULE
454+
EOF
455+
test_cmp actual expect
456+
'
457+
449458
test_expect_success 'stop preserves surrounding schedule' '
450459
echo "Crucial information!" >>cron.txt &&
451460
GIT_TEST_CRONTAB="test-tool crontab cron.txt" git maintenance stop &&

0 commit comments

Comments
 (0)