From 17936a0dc7d75eb1e93a37bcf5959f03add53c10 Mon Sep 17 00:00:00 2001 From: Richard Ipsum Date: Tue, 10 Dec 2013 11:43:01 +0000 Subject: Fix git-backup-on-error test This test didn't have the correct expected output. This commit corrects the expected output and amends the test so that it fails if there are no pack files in the test backup repo. --- tests/git-backup-on-error.script | 1 + tests/git-backup-on-error.stdout | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/tests/git-backup-on-error.script b/tests/git-backup-on-error.script index fbb3368..544a392 100755 --- a/tests/git-backup-on-error.script +++ b/tests/git-backup-on-error.script @@ -30,6 +30,7 @@ normalize() { DATETIMESPEC='[0-9]*-[0-9]*-[0-9]*-[0-9]*:[0-9]*:[0-9]*' sed -r -e "s|git-pre-update-$DATETIMESPEC|git-pre-update-DATETIME|g" \ -e "s|git-post-fail-$DATETIMESPEC|git-post-fail-DATETIME|g" \ + -e "s/pack-[0-9a-z]+\.(idx|pack)$/pack-file/" \ -e '/hooks\/.*\.sample/d' \ -e "s|$DATADIR|DATADIR|g" "$@" } diff --git a/tests/git-backup-on-error.stdout b/tests/git-backup-on-error.stdout index b284701..d918599 100644 --- a/tests/git-backup-on-error.stdout +++ b/tests/git-backup-on-error.stdout @@ -12,6 +12,11 @@ DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/info DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/info/exclude DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/info/refs DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/objects +DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/objects/info +DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/objects/info/packs +DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/objects/pack +DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/objects/pack/pack-file +DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/objects/pack/pack-file DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/packed-refs DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/refs DATADIR/work-dir/git-backup-test-repo/git-post-fail-DATETIME/refs/heads @@ -27,6 +32,11 @@ DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/info DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/info/exclude DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/info/refs DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/objects +DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/objects/info +DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/objects/info/packs +DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/objects/pack +DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/objects/pack/pack-file +DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/objects/pack/pack-file DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/packed-refs DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/refs DATADIR/work-dir/git-backup-test-repo/git-pre-update-DATETIME/refs/heads @@ -41,6 +51,11 @@ DATADIR/work-dir/git-backup-test-repo/git/info DATADIR/work-dir/git-backup-test-repo/git/info/exclude DATADIR/work-dir/git-backup-test-repo/git/info/refs DATADIR/work-dir/git-backup-test-repo/git/objects +DATADIR/work-dir/git-backup-test-repo/git/objects/info +DATADIR/work-dir/git-backup-test-repo/git/objects/info/packs +DATADIR/work-dir/git-backup-test-repo/git/objects/pack +DATADIR/work-dir/git-backup-test-repo/git/objects/pack/pack-file +DATADIR/work-dir/git-backup-test-repo/git/objects/pack/pack-file DATADIR/work-dir/git-backup-test-repo/git/packed-refs DATADIR/work-dir/git-backup-test-repo/git/refs DATADIR/work-dir/git-backup-test-repo/git/refs/heads -- cgit v1.2.1