git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 4/5] t/t7006: ignore return status of shell's unset builtin

From
Brandon Casey <casey@nrlssc.navy.mil>
Date
Jun 2, 2010, 00:13 UTC
Message-ID
<Wt_M4qptcPdpY0Q3jqUbfMMZpuKZEHudj8tavRDS41LEhIuAY6Jac5ja0dD0ZRTTyKV_0v7MM6g@cipher.nrlssc.navy.mil>
In-Reply-To
<Wt_M4qptcPdpY0Q3jqUbfIk6yMCN9Ja5RCtRUsADK5OJGrz7R_Cq1oGpeQoN7A9uCvw38jm63Jo@cipher.nrlssc.navy.mil>
From: Brandon Casey <drafnel@gmail.com>

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 it's return status.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
---
 t/t7006-pager.sh |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/t/t7006-pager.sh b/t/t7006-pager.sh
index 3bc7a2a..a82bfb1 100755
--- a/t/t7006-pager.sh
+++ b/t/t7006-pager.sh
@@ -40,7 +40,7 @@ else
 fi
 
 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 &&
 
 	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' '
-	unset PAGER GIT_PAGER &&
+	unset PAGER GIT_PAGER
 	test_might_fail git config --unset core.pager ||
 	cleanup_fail &&
 
@@ -173,7 +173,7 @@ then
 fi
 
 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 &&
 	rm -f default_pager_used ||
 	cleanup_fail &&
@@ -192,7 +192,7 @@ test_expect_success SIMPLEPAGER 'default pager is used by default' '
 '
 
 test_expect_success TTY 'PAGER overrides default pager' '
-	unset GIT_PAGER &&
+	unset GIT_PAGER
 	test_might_fail git config --unset core.pager &&
 	rm -f PAGER_used ||
 	cleanup_fail &&
@@ -204,7 +204,7 @@ test_expect_success TTY 'PAGER overrides default pager' '
 '
 
 test_expect_success TTY 'core.pager overrides PAGER' '
-	unset GIT_PAGER &&
+	unset GIT_PAGER
 	rm -f core.pager_used ||
 	cleanup_fail &&
 
-- 
1.6.6.2
Previous: Jonathan NiederNext: Jonathan Nieder
Message 26 of 31 in “miscellaneous test suite fixes”
  1. 0/5 miscellaneous test suite fixesBrandon Casey, Jun 2, 2010
  2. 1/5 t/t5800: skip if python version is older than 2.5Brandon Casey, Jun 2, 2010
  3. Sverre RabbelierJun 2, 2010
  4. Ævar Arnfjörð BjarmasonJun 2, 2010
  5. Brandon CaseyJun 2, 2010
  6. Brandon CaseyJun 2, 2010
  7. Sverre RabbelierJun 2, 2010
  8. Brandon CaseyJun 2, 2010
  9. test suite work-around for python 2.5 requirementBrandon Casey, Jun 2, 2010
  10. 1/2 Makefile: add PYTHON_PATH to GIT-BUILD-OPTIONSBrandon Casey, Jun 2, 2010
  11. 2/2 t/t5800: skip if python version is older than 2.5Brandon Casey, Jun 2, 2010
  12. Sverre RabbelierAug 17, 2010
  13. Jonathan NiederAug 17, 2010
  14. Sverre RabbelierAug 17, 2010
  15. Jonathan NiederAug 17, 2010
  16. Sverre RabbelierAug 18, 2010
  17. Brandon CaseyAug 18, 2010
  18. Johannes SixtJun 2, 2010
  19. Brandon CaseyJun 2, 2010
  20. 2/5 git-request-pull.sh: remove -e switch to shell interpreter which breaks kshBrandon Casey, Jun 2, 2010
  21. Jonathan NiederJun 2, 2010
  22. Brandon CaseyJun 2, 2010
  23. Junio C HamanoJun 2, 2010
  24. 3/5 t/t5150: remove space from sed scriptBrandon Casey, Jun 2, 2010
  25. Jonathan NiederJun 2, 2010
  26. 4/5 t/t7006: ignore return status of shell's unset builtinBrandon Casey, Jun 2, 2010
  27. Jonathan NiederJun 2, 2010
  28. Johannes SixtJun 2, 2010
  29. Brandon CaseyJun 2, 2010
  30. 4/5 t/t7006: ignore return status of shell's unset builtinBrandon Casey, Jun 2, 2010
  31. 5/5 t/aggregate-results: accomodate systems with small max argument list lengthBrandon Casey, Jun 2, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.