xref: /freebsd/bin/sh/tests/expansion/pathname3.0 (revision 2e3507c25e42292b45a5482e116d278f5515d04d)
1
2v=12345678
3v=$v$v$v$v
4v=$v$v$v$v
5v=$v$v$v$v
6v=$v$v$v$v
7v=$v$v$v$v
8# 8192 bytes
9v=${v##???}
10[ /*/$v = "/*/$v" ] || exit 1
11
12s=////
13s=$s$s$s$s
14s=$s$s$s$s
15s=$s$s$s$s
16s=$s$s$s$s
17# 1024 bytes
18s=${s##??????????}
19[ /var/empt[y]/$s/$v = "/var/empt[y]/$s/$v" ] || exit 2
20while [ ${#s} -lt 1034 ]; do
21	set -- /.${s}et[c]
22	[ ${#s} -gt 1018 ] || [ "$1" = /.${s}etc ] || exit 3
23	set -- /.${s}et[c]/
24	[ ${#s} -gt 1017 ] || [ "$1" = /.${s}etc/ ] || exit 4
25	set -- /.${s}et[c]/.
26	[ ${#s} -gt 1016 ] || [ "$1" = /.${s}etc/. ] || exit 5
27	s=$s/
28done
29