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

[PATCH] Test suite: reset TERM to its previous value after testing.

From
Christian Couder <chriscool@tuxfamily.org>
Date
Oct 26, 2007, 04:13 UTC
Message-ID
<20071026061350.bd090e26.chriscool@tuxfamily.org>

Using konsole, I get no colored output at the end of "t7005-editor.sh" without this patch.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
---
 t/t7005-editor.sh |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

This patch should be applied on top of Pierre Habouzit's "Add some fancy colors in the test library when terminal supports it." patch.

diff --git a/t/t7005-editor.sh b/t/t7005-editor.sh
index 28643b0..01cc0c0 100755
--- a/t/t7005-editor.sh
+++ b/t/t7005-editor.sh
@@ -4,6 +4,8 @@ test_description='GIT_EDITOR, core.editor, and stuff'
 
 . ./test-lib.sh
 
+OLD_TERM="$TERM"
+
 for i in GIT_EDITOR core_editor EDITOR VISUAL vi
 do
 	cat >e-$i.sh <<-EOF
@@ -88,4 +90,6 @@ do
 	'
 done
 
+TERM="$OLD_TERM"
+
 test_done
-- 
1.5.3.4.1494.g253d
Message 1 of 1 in “Test suite: reset TERM to its previous value after testing.”
  1. Test suite: reset TERM to its previous value after testing.Christian Couder, Oct 26, 2007

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.