2 message testing header level 0, 1 and 2
3 $lha c0 test-tmp-h0.lzh test-1
5 $lha c1 test-tmp-h1.lzh test-1
7 $lha c2 test-tmp-h2.lzh test-1
9 $lha xw=test-tmp-h0 test-tmp-h0.lzh
11 $lha xw=test-tmp-h1 test-tmp-h1.lzh
13 $lha xw=test-tmp-h2 test-tmp-h2.lzh
15 $lha vv test-tmp-h0.lzh
17 $lha vv test-tmp-h1.lzh
19 $lha vv test-tmp-h2.lzh
21 $lha vv test-tmp-h0.lzh | grep '\[0\]$'
23 $lha vv test-tmp-h1.lzh | grep '\[1\]$'
25 $lha vv test-tmp-h2.lzh | grep '\[2\]$'
27 diff -r test-1 test-tmp-h0/test-1
29 diff -r test-1 test-tmp-h1/test-1
31 diff -r test-1 test-tmp-h2/test-1
34 cp test-a test-tmp-d1 &&
35 mkdir test-tmp-d1/d2 &&
36 cp test-b test-tmp-d1/d2 &&
37 mkdir test-tmp-d1/d2/d3 &&
38 cp test-c test-tmp-d1/d2/d3 &&
41 $lha c0 test-tmp2-h0.lzh test-tmp-d1
43 $lha c1 test-tmp2-h1.lzh test-tmp-d1
45 $lha c2 test-tmp2-h2.lzh test-tmp-d1
47 $lha xw=test-tmp2-h0 test-tmp2-h0.lzh
49 $lha xw=test-tmp2-h1 test-tmp2-h1.lzh
51 $lha xw=test-tmp2-h2 test-tmp2-h2.lzh
54 $lha vv test-tmp2-h0.lzh
56 $lha vv test-tmp2-h1.lzh
58 $lha vv test-tmp2-h2.lzh
60 $lha vv test-tmp2-h0.lzh | grep '\[0\]$'
62 $lha vv test-tmp2-h1.lzh | grep '\[1\]$'
64 $lha vv test-tmp2-h2.lzh | grep '\[2\]$'
66 diff test-a test-tmp2-h0/test-tmp-d1/test-a
68 diff test-b test-tmp2-h0/test-tmp-d1/d2/test-b
70 diff test-c test-tmp2-h0/test-tmp-d1/d2/d3/test-c
72 diff test-a test-tmp2-h1/test-tmp-d1/test-a
74 diff test-b test-tmp2-h1/test-tmp-d1/d2/test-b
76 diff test-c test-tmp2-h1/test-tmp-d1/d2/d3/test-c
78 diff test-a test-tmp2-h2/test-tmp-d1/test-a
80 diff test-b test-tmp2-h2/test-tmp-d1/d2/test-b
82 diff test-c test-tmp2-h2/test-tmp-d1/d2/d3/test-c
85 # assume that we are allowed to create 255 bytes filename (not path name).
86 # the _POSIX_PATH_MAX (the maximam length of relative path name) value may
89 # Note that on Cygwin/MinGW, on NTFS, the maximam length of whole path
90 # name (contain the drive letter) seems to be 259.
96 file=1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 ;;
99 file=123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345 ;;
101 (cd test-tmp3 && touch $file)
103 $lha cg test-tmp3-hg.lzh test-tmp3 2> test-stderr
105 # on Cygwin/MinGW, skip this test.
106 # the length of pathname does not amount to the limit of level 0 header.
109 *) test -s test-stderr ;;
112 $lha c0 test-tmp3-h0.lzh test-tmp3 2> test-stderr
114 # on Cygwin/MinGW, skip this test.
115 # the length of pathname does not amount to the limit of level 0 header.
118 *) test -s test-stderr ;;
121 $lha c1 test-tmp3-h1.lzh test-tmp3
123 $lha c2 test-tmp3-h2.lzh test-tmp3
125 $lha xw=test-tmp3-hg test-tmp3-hg.lzh
127 $lha xw=test-tmp3-h0 test-tmp3-h0.lzh
129 $lha xw=test-tmp3-h1 test-tmp3-h1.lzh
131 $lha xw=test-tmp3-h2 test-tmp3-h2.lzh
134 $lha vv test-tmp3-hg.lzh
136 $lha vv test-tmp3-h0.lzh
138 $lha vv test-tmp3-h1.lzh
140 $lha vv test-tmp3-h2.lzh
142 $lha vv test-tmp3-hg.lzh | grep '\[0\]$'
144 $lha vv test-tmp3-h0.lzh | grep '\[0\]$'
146 $lha vv test-tmp3-h1.lzh | grep '\[1\]$'
148 $lha vv test-tmp3-h2.lzh | grep '\[2\]$'
150 test -f test-tmp3-hg/$(echo test-tmp3/$file | cut -c-233)
152 test -f test-tmp3-h0/$(echo test-tmp3/$file | cut -c-221)
154 test -f test-tmp3-h1/test-tmp3/$file
156 test -f test-tmp3-h2/test-tmp3/$file
158 # the header size is 0x101 instead of 0x100 on level 2 header
159 file=test-tmp9012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
162 $lha c2 test-tmp4-h2.lzh $file
164 $lha vv test-tmp4-h2.lzh
166 $lha vv test-tmp4-h2.lzh | grep '\[2\]$'
168 $lha xw=test-tmp4 test-tmp4-h2.lzh
170 test x"`/bin/ls -l test-tmp4-h2.lzh | awk '{print $5}'`" = x258
172 test -f test-tmp4/$file