From 74e27f8147407be2efaba5789e16577fab4e3e03 Mon Sep 17 00:00:00 2001 From: arai Date: Sat, 24 Aug 2002 12:47:21 +0000 Subject: [PATCH] * tests/lha-test.in (lha-test14): added to test the symbolic link file. * tests/lha-test14: ditto. git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/lha/lha/trunk@524 6a8cc165-1e22-0410-a132-eb4e3f353aba --- tests/lha-test14 | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 tests/lha-test14 diff --git a/tests/lha-test14 b/tests/lha-test14 new file mode 100644 index 0000000..4b6649e --- /dev/null +++ b/tests/lha-test14 @@ -0,0 +1,68 @@ +# -*- shell-script -*- +FILENAME=lha-test14 +message testing the symbolic links + +ln -s test-a test-tmp-a && +ln -s test-b test-tmp-b && +ln -s test-c test-tmp-c + check $? $LINENO +$lha c test-tmp-1.lzh test-tmp-[abc] + check $? $LINENO +$lha v test-tmp-1.lzh + check $? $LINENO +$lha xw=test-tmp-1 test-tmp-1.lzh 2> test-tmp-stderr + check $? $LINENO +# LHa: Symbolic Link test-a -> test-tmp-1/test-tmp-a +# LHa: Symbolic Link test-b -> test-tmp-1/test-tmp-b +# LHa: Symbolic Link test-c -> test-tmp-1/test-tmp-c +test -s test-tmp-stderr + check $? $LINENO +test -L test-tmp-1/test-tmp-a && +test -L test-tmp-1/test-tmp-b && +test -L test-tmp-1/test-tmp-c + check $? $LINENO +# symbolic link is broken +test ! -e test-tmp-1/test-tmp-a && +test ! -e test-tmp-1/test-tmp-b && +test ! -e test-tmp-1/test-tmp-c + check $? $LINENO + +# symbolic link filename contains '|' +ln -s test-a test-tmp-\|foo + check $? $LINENO +$lha c test-tmp-2.lzh test-tmp-\|foo 2> test-tmp-stderr +test $? -ne 0 + check $? $LINENO +#LHa: Error: symlink name "test-tmp-|foo" contains '|' char. change it into '_' +test -s test-tmp-stderr + check $? $LINENO +# '|' was changed into '_'. +$lha v test-tmp-2.lzh + check $? $LINENO +$lha v test-tmp-2.lzh | egrep 'test-a -> test-tmp-_foo' + check $? $LINENO +$lha xw=test-tmp-2 test-tmp-2.lzh 2> test-tmp-stderr + check $? $LINENO +test -s test-tmp-stderr + check $? $LINENO +test -L test-tmp-2/test-tmp-_foo && +test ! -e test-tmp-1/test-tmp-_foo + check $? $LINENO +# linked filename contains '|' +touch test-tmp-\|bar && +ln -s test-test-tmp-\|bar test-tmp-foo + check $? $LINENO +$lha c test-tmp-3.lzh test-tmp-foo + check $? $LINENO +$lha v test-tmp-3.lzh + check $? $LINENO +$lha v test-tmp-3.lzh | egrep 'test-tmp-\|bar -> test-tmp-foo' + check $? $LINENO +$lha xw=test-tmp-3 test-tmp-3.lzh 2> test-tmp-stderr + check $? $LINENO +# LHa: Symbolic Link test-test-tmp-|bar -> test-tmp-3/test-tmp-foo +test -s test-tmp-stderr + check $? $LINENO +test -L test-tmp-3/test-tmp-foo && +test ! -e test-tmp-1/test-tmp-foo + check $? $LINENO -- 2.11.0