]> git.saurik.com Git - apple/shell_cmds.git/blob - sh/tests/expansion/pathname3.0
80d6478631ebb6d46412fcabf7e01c19b68a083f
[apple/shell_cmds.git] / sh / tests / expansion / pathname3.0
1 # $FreeBSD: head/bin/sh/tests/expansion/pathname3.0 211155 2010-08-10 22:45:59Z jilles $
2
3 v=12345678
4 v=$v$v$v$v
5 v=$v$v$v$v
6 v=$v$v$v$v
7 v=$v$v$v$v
8 v=$v$v$v$v
9 # 8192 bytes
10 v=${v##???}
11 [ /*/$v = "/*/$v" ] || exit 1
12
13 s=////
14 s=$s$s$s$s
15 s=$s$s$s$s
16 s=$s$s$s$s
17 s=$s$s$s$s
18 # 1024 bytes
19 s=${s##??????????}
20 [ /var/empt[y]/$s/$v = "/var/empt[y]/$s/$v" ] || exit 2
21 while [ ${#s} -lt 1034 ]; do
22 set -- /.${s}et[c]
23 [ ${#s} -gt 1018 ] || [ "$1" = /.${s}etc ] || exit 3
24 set -- /.${s}et[c]/
25 [ ${#s} -gt 1017 ] || [ "$1" = /.${s}etc/ ] || exit 4
26 set -- /.${s}et[c]/.
27 [ ${#s} -gt 1016 ] || [ "$1" = /.${s}etc/. ] || exit 5
28 s=$s/
29 done