Re: [PATCH] t9001: set TERM=dumb to prevent ANSI output

Subsystems: the rest

3 messages, 3 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] t9001: set TERM=dumb to prevent ANSI output

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:44:21

Johannes Schindelin [off-list ref] writes:
At least on one of my machines, Term::ReadLine tries to be clever and
sends \x1b\x5b1034h at the end of the script when TERM is set to 'xterm'.

To prevent that, force TERM=dumb just for the test.
We try to set up a pretty vanilla environment for test repeatability in
t/test-lib.sh, and I suspect we would simply want to do this over there.

Wouldn't this make more sense?
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 87a5ea4..7f6331a 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -7,8 +7,9 @@
 LANG=C
 LC_ALL=C
 PAGER=cat
+TERM=dumb
 TZ=UTC
-export LANG LC_ALL PAGER TZ
+export LANG LC_ALL PAGER TERM TZ
 EDITOR=:
 VISUAL=:
 unset GIT_EDITOR

Re: [PATCH] t9001: set TERM=dumb to prevent ANSI output

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:44:21

Hi,

On Thu, 6 Mar 2008, Junio C Hamano wrote:
Johannes Schindelin [off-list ref] writes:
quoted
At least on one of my machines, Term::ReadLine tries to be clever and
sends \x1b\x5b1034h at the end of the script when TERM is set to 'xterm'.

To prevent that, force TERM=dumb just for the test.
We try to set up a pretty vanilla environment for test repeatability in
t/test-lib.sh, and I suspect we would simply want to do this over there.

Wouldn't this make more sense?
Sure!

Ciao,
Dscho

Re: [PATCH] t9001: set TERM=dumb to prevent ANSI output

From: Christian Couder <hidden>
Date: 2016-06-15 22:44:21

Le vendredi 7 mars 2008, Junio C Hamano a écrit :
quoted hunk
Johannes Schindelin [off-list ref] writes:
quoted
At least on one of my machines, Term::ReadLine tries to be clever and
sends \x1b\x5b1034h at the end of the script when TERM is set to
'xterm'.

To prevent that, force TERM=dumb just for the test.
We try to set up a pretty vanilla environment for test repeatability in
t/test-lib.sh, and I suspect we would simply want to do this over there.

Wouldn't this make more sense?
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 87a5ea4..7f6331a 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -7,8 +7,9 @@
 LANG=C
 LC_ALL=C
 PAGER=cat
+TERM=dumb
 TZ=UTC
-export LANG LC_ALL PAGER TZ
+export LANG LC_ALL PAGER TERM TZ
 EDITOR=:
 VISUAL=:
 unset GIT_EDITOR
This may not work well with colored output.
In test-lib.sh line 62 there is :

[ "x$TERM" != "xdumb" ] &&
	[ -t 1 ] &&
	tput bold >/dev/null 2>&1 &&
	tput setaf 1 >/dev/null 2>&1 &&
	tput sgr0 >/dev/null 2>&1 &&
	color=t

Thanks,
Christian.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help