Use newline for dash, not CR

This commit is contained in:
ZyX 2014-11-28 23:01:19 +03:00
parent 5c75bef18c
commit c81ef95c27
1 changed files with 5 additions and 1 deletions

View File

@ -78,6 +78,10 @@ run() {
"$@"
}
# HACK: get newline for use in strings given that "\n" and $'' do not work.
NL="$(printf '\nE')"
NL="${NL%E}"
run_test() {
TEST_TYPE="$1"
shift
@ -105,7 +109,7 @@ run_test() {
# …
# prompt1> prompt2> …
while read -r line ; do
screen -S "$SESNAME" -p 0 -X stuff "$line"$(printf '\r')
screen -S "$SESNAME" -p 0 -X stuff "$line$NL"
sleep 1
done < tests/test_shells/input.$SH
else