[Toybox] [PATCH 4/4] sh: add a test for x=${x//y}

Alexander Holler holler at ahsoftware.de
Sat Nov 5 00:10:30 PDT 2022


---
 tests/sh.test | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/sh.test b/tests/sh.test
index 984f0928..1b60f9f1 100644
--- a/tests/sh.test
+++ b/tests/sh.test
@@ -214,6 +214,7 @@ testing '${x#short} ${x##long}' 'x=banana; echo ${x#b*n} ${x##b*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=${x//y}' 'x=potato; x=${x//ta}; echo $x' 'poto\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.25.1



More information about the Toybox mailing list