Skip to content

Commit 990629f

Browse files
committed
fix bash test on Windows
1 parent 0288a26 commit 990629f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

regress/cfgmatch.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,9 @@ EOD
175175
trace "test spec $spec"
176176
result=`${SUDO} ${SSHD} -f $OBJ/sshd_config -T -C "$spec" | \
177177
awk '$1=="banner"{print $2}'`
178+
if [ "$os" == "windows" ]; then
179+
result=${result/$'\r'/} # remove CR (carriage return)
180+
fi
178181
if [ "$result" != "$expected" ]; then
179182
fail "match $config expected $expected got $result"
180183
fi

0 commit comments

Comments
 (0)