]> git.saurik.com Git - apple/shell_cmds.git/blob - sh/tests/expansion/trim7.0
4f237cc9c875b601c8879a3217cd844d01c26f66
[apple/shell_cmds.git] / sh / tests / expansion / trim7.0
1 # $FreeBSD: head/bin/sh/tests/expansion/trim7.0 219623 2011-03-13 20:02:39Z jilles $
2
3 set -- 1 2 3 4 5 6 7 8 9 10 11 12 13
4 [ "${##1}" = 3 ] || echo '${##1} wrong'
5 [ "${###1}" = 3 ] || echo '${###1} wrong'
6 [ "${###}" = 13 ] || echo '${###} wrong'
7 [ "${#%3}" = 1 ] || echo '${#%3} wrong'
8 [ "${#%%3}" = 1 ] || echo '${#%%3} wrong'
9 [ "${#%%}" = 13 ] || echo '${#%%} wrong'
10 set --
11 [ "${##0}" = "" ] || echo '${##0} wrong'
12 [ "${###0}" = "" ] || echo '${###0} wrong'
13 [ "${###}" = 0 ] || echo '${###} wrong'
14 [ "${#%0}" = "" ] || echo '${#%0} wrong'
15 [ "${#%%0}" = "" ] || echo '${#%%0} wrong'
16 [ "${#%%}" = 0 ] || echo '${#%%} wrong'