Coloring breaking in Jenkins
alexharv074 opened this issue · comments
When the $TERM variable is not set, shunit2 fails as a result of its call to tput.
To reproduce:
cat > test.sh <<EOF
testFoo() {
assertEquals "1" "1"
}
. shunit2
EOF
unset TERM
bash test.sh
What I expect:
Should work fine.
What actually happens:
tput: No value for $TERM and no -T specified
/usr/local/bin/shunit2: line 846: [: : integer expression expected
testFoo
ASSERT:expected:<4> but was:<5>
shunit2:ERROR testFoo() returned non-zero return code.
Ran 1 test.
FAILED (failures=2)
Workaround:
-bash-4.2$ export SHUNIT_COLOR=none
-bash-4.2$ bash test.sh
testFoo
Ran 1 test.
OK
Ah, this is fixed in master. I was testing on an old version. Closing.