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>

Martin Ågren committed Dec 21, 2020 at 22:26 UTC a52df25a546e33e76c3ddeff66545e4437249290
1 file changed +9
t/t7900-maintenance.sh
+9
@@ -446,6 +446,15 @@ test_expect_success 'start preserves existing schedule' '
446 grep "Important information!" cron.txt
447 '
448
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 +
458 test_expect_success 'stop preserves surrounding schedule' '
459 echo "Crucial information!" >>cron.txt &&
460 GIT_TEST_CRONTAB="test-tool crontab cron.txt" git maintenance stop &&