t/t7006: ignore return status of shell's unset builtin

The unset builtin of Solaris's xpg4/sh returns non-zero if it is passed a
variable name which was not previously set.  Since the unset is not likely
to fail, ignore its return status, but add a semicolon as a clue that the
'&&' was deliberately left off.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Acked-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Brandon Casey 2010-06-02 10:32:26 -05:00 коммит произвёл Junio C Hamano
Родитель 6f89384fe0
Коммит c289c315c2
1 изменённых файлов: 5 добавлений и 5 удалений

Просмотреть файл

@ -40,7 +40,7 @@ else
fi fi
test_expect_success 'setup' ' test_expect_success 'setup' '
unset GIT_PAGER GIT_PAGER_IN_USE && unset GIT_PAGER GIT_PAGER_IN_USE;
test_might_fail git config --unset core.pager && test_might_fail git config --unset core.pager &&
PAGER="cat >paginated.out" && PAGER="cat >paginated.out" &&
@ -159,7 +159,7 @@ test_expect_success 'color when writing to a file intended for a pager' '
' '
test_expect_success 'determine default pager' ' test_expect_success 'determine default pager' '
unset PAGER GIT_PAGER && unset PAGER GIT_PAGER;
test_might_fail git config --unset core.pager || test_might_fail git config --unset core.pager ||
cleanup_fail && cleanup_fail &&
@ -173,7 +173,7 @@ then
fi fi
test_expect_success SIMPLEPAGER 'default pager is used by default' ' test_expect_success SIMPLEPAGER 'default pager is used by default' '
unset PAGER GIT_PAGER && unset PAGER GIT_PAGER;
test_might_fail git config --unset core.pager && test_might_fail git config --unset core.pager &&
rm -f default_pager_used || rm -f default_pager_used ||
cleanup_fail && cleanup_fail &&
@ -192,7 +192,7 @@ test_expect_success SIMPLEPAGER 'default pager is used by default' '
' '
test_expect_success TTY 'PAGER overrides default pager' ' test_expect_success TTY 'PAGER overrides default pager' '
unset GIT_PAGER && unset GIT_PAGER;
test_might_fail git config --unset core.pager && test_might_fail git config --unset core.pager &&
rm -f PAGER_used || rm -f PAGER_used ||
cleanup_fail && cleanup_fail &&
@ -204,7 +204,7 @@ test_expect_success TTY 'PAGER overrides default pager' '
' '
test_expect_success TTY 'core.pager overrides PAGER' ' test_expect_success TTY 'core.pager overrides PAGER' '
unset GIT_PAGER && unset GIT_PAGER;
rm -f core.pager_used || rm -f core.pager_used ||
cleanup_fail && cleanup_fail &&