OSDN Git Service

could not extract files under readonly directories.
[lha/lha.git] / tests / lha-test18
1 # -*- shell-script -*-
2 message restore directory permission
3
4 echo -------------------------------------------------------------------
5
6 mkdir -p test-tmp1/test1/test2 &&
7 cp -r test-1 test-tmp1/test1/test2 &&
8 chmod 444 test-tmp1 &&
9 chmod 644 test-tmp1/test1 &&
10 chmod 666 test-tmp1/test1/test2 &&
11 chmod 755 test-tmp1/test1/test2/test-1
12                                                         check $? $LINENO
13
14 $lha c test-tmp1.lzh test-tmp1
15                                                         check $? $LINENO
16
17 $lha xw=test-tmp2 test-tmp1.lzh
18                                                         check $? $LINENO
19
20 diff -r test-tmp2/test-tmp1 test-tmp1
21                                                         check $? $LINENO
22
23 ls -ld test-tmp2/test-tmp1                    | grep '^dr--r--r--' &&
24 ls -ld test-tmp2/test-tmp1/test1              | grep '^drw-r--r--' &&
25 ls -ld test-tmp2/test-tmp1/test1/test2        | grep '^drw-rw-rw-' &&
26 ls -ld test-tmp2/test-tmp1/test1/test2/test-1 | grep '^drwxr-xr-x'
27                                                         check $? $LINENO