xref: /freebsd/bin/sh/tests/expansion/length1.0 (revision e8d8bef961a50d4dc22501cde4fb9fb0be1b2532)
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