Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Ågren <martin.agren@gmail.com>2020-12-22 00:26:33 +0300
committerJunio C Hamano <gitster@pobox.com>2020-12-22 01:33:09 +0300
commita52df25a546e33e76c3ddeff66545e4437249290 (patch)
treecba0170de52d3ad9d2da741460b40caa046241de /t/t7900-maintenance.sh
parent66dc0a3625e9f3ea8e99e5ae4f4d3dded1d5c8c6 (diff)
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>
Diffstat (limited to 't/t7900-maintenance.sh')
-rwxr-xr-xt/t7900-maintenance.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t7900-maintenance.sh b/t/t7900-maintenance.sh
index 4bbfce31e9..99bf0c7582 100755
--- a/t/t7900-maintenance.sh
+++ b/t/t7900-maintenance.sh
@@ -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 &&