From 73038247898125bf105a5d57985f4fba53349237 Mon Sep 17 00:00:00 2001 From: Martijn Dekker Date: Fri, 18 Sep 2020 13:53:53 +0200 Subject: [PATCH] tests/attributes.sh: add reproducer from rhbz#903750 (already fixed in 93u+) --- src/cmd/ksh93/tests/attributes.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/cmd/ksh93/tests/attributes.sh b/src/cmd/ksh93/tests/attributes.sh index beaa2eebe..a3b61609c 100755 --- a/src/cmd/ksh93/tests/attributes.sh +++ b/src/cmd/ksh93/tests/attributes.sh @@ -312,6 +312,13 @@ EOF EOF } 2> /dev/null || err_exit 'typeset -R should not preserve old attributes' +unset x +typeset -R 3 x +x=12345 +x=9876 +[[ $x == 876 ]] || err_exit "typeset -R not working with reassignment (expected 876, got $x)" +unset x + expected='YWJjZGVmZ2hpag==' unset foo typeset -b -Z10 foo