Skip to content

Commit c13be91

Browse files
committed
Fix IFS construction in test helper scripts
Since command substitution strips away all trailing whitespace, we need to print a non-whitespace character at the end of the sequence and later remove it.
1 parent b608433 commit c13be91

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

test/Xnest.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
# Not quite the "unofficial BASH strict mode", but better than nothing.
44
set -eu
5-
IFS="$(printf '\n\t')"
5+
IFS="$(printf '\t\n.')"
6+
IFS="${IFS%?}"
67

78
# Simple test script to launch the locally-built tint3 and the Openbox window
89
# manager in a nested X session.

test/xvfb-run.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
# Not quite the "unofficial BASH strict mode", but better than nothing.
44
set -eu
5-
IFS="$(printf '\n\t')"
5+
IFS="$(printf '\t\n.')"
6+
IFS="${IFS%?}"
67

78
# Simple wrapper around Xvfb, used to run some test programs in a virtual X
89
# server. Provides a minimal replacement for xvfb-run which isn't universally

0 commit comments

Comments
 (0)