xref: /freebsd/bin/sh/tests/expansion/trim7.0 (revision 59c8e88e72633afbc47a4ace0d2170d00d51f7dc)
1
2set -- 1 2 3 4 5 6 7 8 9 10 11 12 13
3[ "${##1}" = 3 ] || echo '${##1} wrong'
4[ "${###1}" = 3 ] || echo '${###1} wrong'
5[ "${###}" = 13 ] || echo '${###} wrong'
6[ "${#%3}" = 1 ] || echo '${#%3} wrong'
7[ "${#%%3}" = 1 ] || echo '${#%%3} wrong'
8[ "${#%%}" = 13 ] || echo '${#%%} wrong'
9set --
10[ "${##0}" = "" ] || echo '${##0} wrong'
11[ "${###0}" = "" ] || echo '${###0} wrong'
12[ "${###}" = 0 ] || echo '${###} wrong'
13[ "${#%0}" = "" ] || echo '${#%0} wrong'
14[ "${#%%0}" = "" ] || echo '${#%%0} wrong'
15[ "${#%%}" = 0 ] || echo '${#%%} wrong'
16