shithub: scc

Download patch

ref: 7043b008377e2e4f66c728a33da0258ca14a5bd2
parent: 817b9de7a3b4977e684a7a41a0a14b770f264c78
author: Roberto E. Vargas Caballero <[email protected]>
date: Thu Sep 7 06:51:33 EDT 2017

[tests] Force to use hard tabs

tabs doesn't work if the tty is not configured to use hardware tabs.
In this patch is also included an additional quoting for [] characters.

--- a/tests/execute/chktest.sh
+++ b/tests/execute/chktest.sh
@@ -1,6 +1,8 @@
 #!/bin/sh
 
-trap 'tabs -8;rm -f a.out; exit 1' 0 1 2 3 15
+ttyflags=`stty -g`
+trap "stty $ttyflags;tabs -8;rm -f a.out; exit 1" 0 1 2 3 15
+stty tabs
 tabs 40
 ulimit -c 0
 rm -f test.log
@@ -12,5 +14,5 @@
 	printf "%s" $state
 	rm -f a.out
 	(scc -Isysinclude $CFLAGS "$i" && ./a.out) 2>test.log &&
-		echo [OK] || echo [FAILED]
+		echo "[OK]" || echo "[FAILED]"
 done