summaryrefslogtreecommitdiff
path: root/t/t4200-rerere.sh
diff options
context:
space:
mode:
authorBrian Gernhardt <brian@gernhardtsoftware.com>2010-03-20 08:29:11 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-03-20 16:15:17 (GMT)
commit4a45f7dd49ba9a8943ad9b11fb7bed04f0cb4f15 (patch)
tree5e82ea57ee14ac7fadbd84d1543896b3e581c85c /t/t4200-rerere.sh
parenta673cfede6987ee815de9189eab054fc462e5c9f (diff)
downloadgit-4a45f7dd49ba9a8943ad9b11fb7bed04f0cb4f15.zip
git-4a45f7dd49ba9a8943ad9b11fb7bed04f0cb4f15.tar.gz
git-4a45f7dd49ba9a8943ad9b11fb7bed04f0cb4f15.tar.bz2
Use test_expect_success for test setups
Several tests did not use test_expect_success for their setup commands. Putting these start commands into the testing framework means both that errors during setup will be caught quickly and that non-error text will be suppressed without -v. Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4200-rerere.sh')
-rwxr-xr-xt/t4200-rerere.sh70
1 files changed, 36 insertions, 34 deletions
diff --git a/t/t4200-rerere.sh b/t/t4200-rerere.sh
index bb402c3..70856d0 100755
--- a/t/t4200-rerere.sh
+++ b/t/t4200-rerere.sh
@@ -8,40 +8,42 @@ test_description='git rerere
. ./test-lib.sh
-cat > a1 << EOF
-Some title
-==========
-Whether 'tis nobler in the mind to suffer
-The slings and arrows of outrageous fortune,
-Or to take arms against a sea of troubles,
-And by opposing end them? To die: to sleep;
-No more; and by a sleep to say we end
-The heart-ache and the thousand natural shocks
-That flesh is heir to, 'tis a consummation
-Devoutly to be wish'd.
-EOF
-
-git add a1
-git commit -q -a -m initial
-
-git checkout -b first
-cat >> a1 << EOF
-Some title
-==========
-To die, to sleep;
-To sleep: perchance to dream: ay, there's the rub;
-For in that sleep of death what dreams may come
-When we have shuffled off this mortal coil,
-Must give us pause: there's the respect
-That makes calamity of so long life;
-EOF
-git commit -q -a -m first
-
-git checkout -b second master
-git show first:a1 |
-sed -e 's/To die, t/To die! T/' -e 's/Some title/Some Title/' > a1
-echo "* END *" >>a1
-git commit -q -a -m second
+test_expect_success 'setup' "
+ cat > a1 <<- EOF &&
+ Some title
+ ==========
+ Whether 'tis nobler in the mind to suffer
+ The slings and arrows of outrageous fortune,
+ Or to take arms against a sea of troubles,
+ And by opposing end them? To die: to sleep;
+ No more; and by a sleep to say we end
+ The heart-ache and the thousand natural shocks
+ That flesh is heir to, 'tis a consummation
+ Devoutly to be wish'd.
+ EOF
+
+ git add a1 &&
+ git commit -q -a -m initial &&
+
+ git checkout -b first &&
+ cat >> a1 <<- EOF &&
+ Some title
+ ==========
+ To die, to sleep;
+ To sleep: perchance to dream: ay, there's the rub;
+ For in that sleep of death what dreams may come
+ When we have shuffled off this mortal coil,
+ Must give us pause: there's the respect
+ That makes calamity of so long life;
+ EOF
+ git commit -q -a -m first &&
+
+ git checkout -b second master &&
+ git show first:a1 |
+ sed -e 's/To die, t/To die! T/' -e 's/Some title/Some Title/' > a1 &&
+ echo '* END *' >>a1 &&
+ git commit -q -a -m second
+"
test_expect_success 'nothing recorded without rerere' '
(rm -rf .git/rr-cache; git config rerere.enabled false) &&