1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-19 00:06:12 +02:00

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 <martin.agren@gmail.com>
Acked-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Martin Ågren 2020-12-21 22:26:33 +01:00 committed by Junio C Hamano
parent 66dc0a3625
commit a52df25a54

View File

@ -446,6 +446,15 @@ test_expect_success 'start preserves existing schedule' '
grep "Important information!" cron.txt
'
test_expect_success 'magic markers are correct' '
grep "GIT MAINTENANCE SCHEDULE" cron.txt >actual &&
cat >expect <<-\EOF &&
# BEGIN GIT MAINTENANCE SCHEDULE
# END GIT MAINTENANCE SCHEDULE
EOF
test_cmp actual expect
'
test_expect_success 'stop preserves surrounding schedule' '
echo "Crucial information!" >>cron.txt &&
GIT_TEST_CRONTAB="test-tool crontab cron.txt" git maintenance stop &&