From ae25b7f8866953c7be100f7781ecb45cdbd0919d Mon Sep 17 00:00:00 2001 From: Martijn Dekker Date: Sun, 14 Jun 2020 20:10:07 +0200 Subject: [PATCH] move read -S regress test to readcsv.sh (re: af0bd6ad) --- src/cmd/ksh93/tests/builtins.sh | 5 ----- src/cmd/ksh93/tests/readcsv.sh | 6 ++++++ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/cmd/ksh93/tests/builtins.sh b/src/cmd/ksh93/tests/builtins.sh index a4f732def..e270a11d1 100755 --- a/src/cmd/ksh93/tests/builtins.sh +++ b/src/cmd/ksh93/tests/builtins.sh @@ -692,10 +692,5 @@ EOF PATH=/dev/null whence -q export) || err_exit '`builtin -d` deletes special builtins' -# ====== -# `read -S` should handle double quotes correctly -IFS=',' read -S a b c <<<'foo,"""title"" data",bar' -[[ $b == '"title" data' ]] || err_exit '"" inside "" not handled correctly with read -S' - # ====== exit $((Errors<125?Errors:125)) diff --git a/src/cmd/ksh93/tests/readcsv.sh b/src/cmd/ksh93/tests/readcsv.sh index 691317322..dd3e96303 100755 --- a/src/cmd/ksh93/tests/readcsv.sh +++ b/src/cmd/ksh93/tests/readcsv.sh @@ -72,5 +72,11 @@ do typeset -a arr done diff "$tmp1" "$tmp2" >/dev/null 2>&1 || err_exit "files $tmp1 and $tmp2 differ" +# ====== +# `read -S` should handle double quotes correctly +IFS=',' read -S a b c <<<'foo,"""title"" data",bar' +[[ $b == '"title" data' ]] || err_exit '"" inside "" not handled correctly with read -S' + +# ====== exit $((Errors<125?Errors:125))