diff options
author | Ron Yorston <rmy@pobox.com> | 2023-01-30 12:24:34 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2023-01-30 12:24:34 +0000 |
commit | b9a1b02dee2b82e4e4a580c446a1e022aa96166d (patch) | |
tree | 6dfc496086422beffd9880d8e06ed4506d201495 /testsuite | |
parent | 7a537eb71874cd6c8d0e9ab1f906e6466e7f793c (diff) | |
download | busybox-w32-b9a1b02dee2b82e4e4a580c446a1e022aa96166d.tar.gz busybox-w32-b9a1b02dee2b82e4e4a580c446a1e022aa96166d.tar.bz2 busybox-w32-b9a1b02dee2b82e4e4a580c446a1e022aa96166d.zip |
ash,make: fix CRLF handling
Fix remove_cr() so it only removes CRs which are part of a CRLF
pair, not every CR.
Add a test case for the shell.
Diffstat (limited to 'testsuite')
-rwxr-xr-x | testsuite/sh.tests | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/testsuite/sh.tests b/testsuite/sh.tests index 2a510fb25..872611a1b 100755 --- a/testsuite/sh.tests +++ b/testsuite/sh.tests | |||
@@ -88,3 +88,9 @@ IyEvYmluL3NoICAtIAplY2hvICJIZWxsbyB3b3JsZCIK | |||
88 | ==== | 88 | ==== |
89 | " | 89 | " |
90 | rm -f shebang_leading_argument_trailing_space.sh | 90 | rm -f shebang_leading_argument_trailing_space.sh |
91 | |||
92 | testing "remove CRs from string being evaluated" \ | ||
93 | "sh -c \"$(printf 'set -e\r\necho Hello world\r\n')\"" \ | ||
94 | "Hello world\n" "" "" | ||
95 | |||
96 | exit $FAILCOUNT | ||