From 76834a1a5862c5e338d405e8dc946fedf4208bcb Mon Sep 17 00:00:00 2001 From: Alexander Holler Date: Sat, 5 Nov 2022 08:10:28 +0100 Subject: [PATCH] sh: add a test for x=${x%y} --- tests/sh.test | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/sh.test b/tests/sh.test index 7dd7b00e..984f0928 100644 --- a/tests/sh.test +++ b/tests/sh.test @@ -213,6 +213,7 @@ testing '${x#short} ${x##long}' 'x=banana; echo ${x#b*n} ${x##b*n}' \ 'ana a\n' '' '' toyonly testing '${x#utf8}' 'x=aそcde; echo ${x##a?c}' 'de\n' '' '' testing '${x%y}' 'x=potato; echo ${x%t*o} ${x%%t*o}' 'pota po\n' '' '' +testing 'x=${x%y}' 'x=potato; x=${x%t*o}; echo $x' 'pota\n' '' '' testing '${x^y}' 'x=aaaaa; echo ${x^a}' 'Aaaaa\n' '' '' testing '${x^^y}' 'x=abccdec; echo ${x^^c}; x=abcdec; echo ${x^^c}' \ 'abCCdeC\nabCdeC\n' '' '' -- 2.39.2