t0004 (unwritable files): simplify error handling
commitdbda967684dfefd0ac3518f9805ccf9ded9af429
authorJonathan Nieder <jrnieder@gmail.com>
Tue, 7 Sep 2010 01:50:17 +0000 (6 20:50 -0500)
committerJunio C Hamano <gitster@pobox.com>
Thu, 30 Sep 2010 17:39:06 +0000 (30 10:39 -0700)
treebfe19181c3eff2748b21fa68c75135fa7120bc31
parente14712c9e6801855a033ee1e7013f54580f270a1
t0004 (unwritable files): simplify error handling

Instead of

... normal test script ...
status=$?
... cleanup ...
(exit $status)

set up cleanup commands with test_when_finished.  This makes the
test script a little shorter, and more importantly, it ensures errors
during cleanup are reported.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t0004-unwritable.sh