2 message testing to handle symbolic links
4 ln -s test-a test-tmp-a &&
5 ln -s test-b test-tmp-b &&
6 ln -s test-c test-tmp-c
8 $lha c test-tmp-1.lzh test-tmp-[abc]
12 $lha xw=test-tmp-1 test-tmp-1.lzh 2> test-tmp-stderr
14 # LHa: Symbolic Link test-a -> test-tmp-1/test-tmp-a
15 # LHa: Symbolic Link test-b -> test-tmp-1/test-tmp-b
16 # LHa: Symbolic Link test-c -> test-tmp-1/test-tmp-c
17 test -s test-tmp-stderr
19 test -L test-tmp-1/test-tmp-a &&
20 test -L test-tmp-1/test-tmp-b &&
21 test -L test-tmp-1/test-tmp-c
23 # symbolic link is broken
24 test ! -f test-tmp-1/test-tmp-a &&
25 test ! -f test-tmp-1/test-tmp-b &&
26 test ! -f test-tmp-1/test-tmp-c
29 # symbolic link filename contains '|'
30 case `$lha --version 2>&1` in
31 *-pc-cygwin*|*-pc-mingw*)
32 # On MS Windows, '|' is invalid character as filename.
35 ln -s test-a test-tmp-\|foo
37 $lha c test-tmp-2.lzh test-tmp-\|foo 2> test-tmp-stderr
40 #LHa: Error: symlink name "test-tmp-|foo" contains '|' char. change it into '_'
41 test -s test-tmp-stderr
43 # '|' was changed into '_'.
46 $lha v test-tmp-2.lzh | egrep 'test-tmp-_foo -> test-a'
48 $lha xw=test-tmp-2 test-tmp-2.lzh 2> test-tmp-stderr
50 test -s test-tmp-stderr
52 test -L test-tmp-2/test-tmp-_foo &&
53 test ! -f test-tmp-1/test-tmp-_foo
55 # linked filename contains '|'
56 touch test-tmp-\|bar &&
57 ln -s test-tmp-\|bar test-tmp-foo
59 $lha c test-tmp-3.lzh test-tmp-foo
63 $lha v test-tmp-3.lzh | egrep 'test-tmp-foo -> test-tmp-\|bar'
65 $lha xw=test-tmp-3 test-tmp-3.lzh 2> test-tmp-stderr
67 # LHa: Symbolic Link test-tmp-3/test-tmp-foo -> test-tmp-|bar
68 test -s test-tmp-stderr
70 test -L test-tmp-3/test-tmp-foo &&
71 test ! -f test-tmp-1/test-tmp-foo