xref: /freebsd/bin/sh/tests/expansion/length1.0 (revision ca987d4641cdcd7f27e153db17c5bf064934faf5)
1# $FreeBSD$
2
3v=abcd
4[ "${#v}" = 4 ] || echo '${#v} wrong'
5v=$$
6[ "${#$}" = "${#v}" ] || echo '${#$} wrong'
7[ "${#!}" = 0 ] || echo '${#!} wrong'
8set -- 01 2 3 4 5 6 7 8 9 10 11 12 0013
9[ "${#1}" = 2 ] || echo '${#1} wrong'
10[ "${#13}" = 4 ] || echo '${#13} wrong'
11v=$0
12[ "${#0}" = "${#v}" ] || echo '${#0} wrong'
13