OSDN Git Service

*** empty log message ***
[lha/lha.git] / tests / lha-test7
1 # -*- shell-script -*-
2 message testing to add/update files to archive.
3 $lha a test-tmp.lzh test-c
4                                                         check $?
5 $lha a test-tmp.lzh test-b
6                                                         check $?
7 $lha u test-tmp.lzh test-a
8                                                         check $?
9 $lha xw=test-tmp test-tmp.lzh
10                                                         check $?
11 diff -r test-1 test-tmp
12                                                         check $?
13 (cd test-tmp
14  echo foo > test-a
15  echo bar > test-b
16  echo baz > test-c
17
18  # update with new files
19  $lha u ../test-tmp.lzh test-[abc]
20 )
21                                                         check $?
22
23 # old files are in test-1 and in current directory
24 # new files are in test-tmp
25
26 $lha xw=test-tmp2 test-tmp.lzh
27                                                         check $?
28 diff -r test-tmp test-tmp2
29                                                         check $?
30 # no update with old files
31 $lha u test-tmp.lzh test-[abc]
32
33 $lha xw=test-tmp3 test-tmp.lzh
34                                                         check $?
35 diff -r test-tmp test-tmp3
36                                                         check $?
37 # replace with old files
38 $lha a test-tmp.lzh test-[abc]
39
40 $lha xw=test-tmp4 test-tmp.lzh
41                                                         check $?
42 diff -r test-1 test-tmp4
43                                                         check $?
44 # replace with new files
45 (cd test-tmp &&
46  $lha a ../test-tmp.lzh test-[abc]
47 )
48
49 $lha xw=test-tmp5 test-tmp.lzh
50                                                         check $?
51 diff -r test-tmp test-tmp5
52                                                         check $?