2 message testing the long filename support
4 # assume that we are allowed to create 255 bytes filename (not path name).
5 # the _POSIX_PATH_MAX (the maximam length of relative path name) value may
8 # Note that on Cygwin/MinGW, on NTFS, the maximam length of whole path
9 # name (contain the drive letter) is limited probably. it seems to be 259 (?)
13 file=123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345
18 # omit the length of current path.
19 file=$(echo $file | cut -c$((echo X: && cd test-tmp1 && pwd && echo test-tmp1-hg) | wc -c)-)
23 (cd test-tmp1 && touch $file)
25 $lha cg test-tmp1-hg.lzh test-tmp1 2> test-stderr
27 # on Cygwin/MinGW, skip this test.
28 # the length of pathname does not amount to the limit of level 0 header.
30 MS-DOS* | CYGWIN*) true ;;
31 *) test -s test-stderr ;;
34 $lha c0 test-tmp1-h0.lzh test-tmp1 2> test-stderr
36 # on Cygwin/MinGW, skip this test.
37 # the length of pathname does not amount to the limit of level 0 header.
39 MS-DOS* | CYGWIN*) true ;;
40 *) test -s test-stderr ;;
43 $lha c1 test-tmp1-h1.lzh test-tmp1
45 $lha c2 test-tmp1-h2.lzh test-tmp1
47 $lha xw=test-tmp1-hg test-tmp1-hg.lzh
49 $lha xw=test-tmp1-h0 test-tmp1-h0.lzh
51 $lha xw=test-tmp1-h1 test-tmp1-h1.lzh
53 $lha xw=test-tmp1-h2 test-tmp1-h2.lzh
56 $lha vv test-tmp1-hg.lzh
58 $lha vv test-tmp1-h0.lzh
60 $lha vv test-tmp1-h1.lzh
62 $lha vv test-tmp1-h2.lzh
64 $lha vv test-tmp1-hg.lzh | egrep '\[0\].?$'
66 $lha vv test-tmp1-h0.lzh | egrep '\[0\].?$'
68 $lha vv test-tmp1-h1.lzh | egrep '\[1\].?$'
70 $lha vv test-tmp1-h2.lzh | egrep '\[2\].?$'
72 test -f test-tmp1-hg/$(echo test-tmp1/$file | cut -c-233)
74 test -f test-tmp1-h0/$(echo test-tmp1/$file | cut -c-221)
76 test -f test-tmp1-h1/test-tmp1/$file
78 test -f test-tmp1-h2/test-tmp1/$file
80 # 0x100 is never set on the header size field on level 2 header
81 file=test-tmp9012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
84 echo "$FILENAME: Warning: current directory is too deep. skip this test..." >&2
87 $lha c2 test-tmp4-h2.lzh $file
89 $lha vv test-tmp4-h2.lzh
91 $lha vv test-tmp4-h2.lzh | egrep '\[2\].?$'
95 $lha x test-tmp4-h2.lzh
97 test x"`$lha vvvq test-tmp4-h2.lzh | head -1`" = x"00 2: 257(0x0101)"