소스 검색

better quoting in scrollup testing shell script

Jan Klemkow 5 년 전
부모
커밋
c4b7051d0a
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      up.sh

+ 3 - 3
up.sh

@@ -4,12 +4,12 @@ set -eu
 export POSIXLY_CORRECT=1
 export POSIXLY_CORRECT=1
 
 
 i=1
 i=1
-while test $i -lt 50; do
-	echo $i
+while test "$i" -lt 50; do
+	echo "$i"
 	i=$((i + 1))
 	i=$((i + 1))
 done > tmp.log
 done > tmp.log
 
 
-(sleep 1; printf "\033[5;2~"; sleep 1; ) \
+(sleep 1; printf '\033[5;2~'; sleep 1; ) \
 	| ./ptty ./scroll tail -fn 50 tmp.log > out.log
 	| ./ptty ./scroll tail -fn 50 tmp.log > out.log
 
 
 cmp out.log up.log
 cmp out.log up.log