@matheusbsbs / matheus-bagliano / commits / c289c315c2
Fork 0

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>

Brandon Casey committed Jun 2, 2010 at 10:32 UTC c289c315c2bfcd5fde99f9e4dbb109f89e29dfce
1 file changed +5 -5
t/t7006-pager.sh
+5 -5
@@ -40,7 +40,7 @@ else
40 fi
41
42 test_expect_success 'setup' '
43 - unset GIT_PAGER GIT_PAGER_IN_USE &&
43 + unset GIT_PAGER GIT_PAGER_IN_USE;
44 test_might_fail git config --unset core.pager &&
45
46 PAGER="cat >paginated.out" &&
@@ -159,7 +159,7 @@ test_expect_success 'color when writing to a file intended for a pager' '
159 '
160
161 test_expect_success 'determine default pager' '
162 - unset PAGER GIT_PAGER &&
162 + unset PAGER GIT_PAGER;
163 test_might_fail git config --unset core.pager ||
164 cleanup_fail &&
165
@@ -173,7 +173,7 @@ then
173 fi
174
175 test_expect_success SIMPLEPAGER 'default pager is used by default' '
176 - unset PAGER GIT_PAGER &&
176 + unset PAGER GIT_PAGER;
177 test_might_fail git config --unset core.pager &&
178 rm -f default_pager_used ||
179 cleanup_fail &&
@@ -192,7 +192,7 @@ test_expect_success SIMPLEPAGER 'default pager is used by default' '
192 '
193
194 test_expect_success TTY 'PAGER overrides default pager' '
195 - unset GIT_PAGER &&
195 + unset GIT_PAGER;
196 test_might_fail git config --unset core.pager &&
197 rm -f PAGER_used ||
198 cleanup_fail &&
@@ -204,7 +204,7 @@ test_expect_success TTY 'PAGER overrides default pager' '
204 '
205
206 test_expect_success TTY 'core.pager overrides PAGER' '
207 - unset GIT_PAGER &&
207 + unset GIT_PAGER;
208 rm -f core.pager_used ||
209 cleanup_fail &&
210