From 0aaaa50b4551ab5912ccd95d66d633844eac6d85 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sun, 2 Oct 2016 02:46:56 +0200 Subject: ash: expand: Fixed "$@" expansion when EXP_FULL is false Upstream commit: Date: Thu, 1 Jan 2015 07:53:10 +1100 expand: Fixed "$@" expansion when EXP_FULL is false The commit 3c06acdac0b1ba0e0acdda513a57ee6e31385dce ([EXPAND] Split unquoted $@/$* correctly when IFS is set but empty) broke the case where $@ is in quotes and EXP_FULL is false. In that case we should still emit IFS as field splitting is not performed. Reported-by: Juergen Daubert Signed-off-by: Herbert Xu Signed-off-by: Denys Vlasenko --- shell/hush_test/hush-vars/var_wordsplit_ifs1.right | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'shell/hush_test/hush-vars/var_wordsplit_ifs1.right') diff --git a/shell/hush_test/hush-vars/var_wordsplit_ifs1.right b/shell/hush_test/hush-vars/var_wordsplit_ifs1.right index efdafc70f..cf583d0aa 100644 --- a/shell/hush_test/hush-vars/var_wordsplit_ifs1.right +++ b/shell/hush_test/hush-vars/var_wordsplit_ifs1.right @@ -22,4 +22,20 @@ Testing: IFS="" "$*" Testing: IFS="" "$@" .abc. .d e. +Testing: !IFS v=$* +v='abc d e' +Testing: !IFS v=$@ +v='abc d e' +Testing: !IFS v="$*" +v='abc d e' +Testing: !IFS v="$@" +v='abc d e' +Testing: IFS="" v=$* +v='abcd e' +Testing: IFS="" v=$@ +v='abcd e' +Testing: IFS="" v="$*" +v='abcd e' +Testing: IFS="" v="$@" +v='abcd e' Finished -- cgit v1.2.3