OSDN Git Service

Merge branch 'master' of github.com:jca02266/lha
[lha/lha.git] / tests / lha-test5
index 7b05fa6..a08a296 100644 (file)
@@ -2,8 +2,23 @@
 message testing to treat stdin/stdout as archive file.
 
 $lha c - test-a test-b test-c > test-tmp.lzh
-                                                       check $?
+                                                       check $? $LINENO
 cat test-tmp.lzh | $lha xw=test-tmp -
-                                                       check $?
+                                                       check $? $LINENO
 diff -r test-1 test-tmp
-                                                       check $?
+                                                       check $? $LINENO
+# output to pipe
+$lha c - test-a test-b test-c | $lha xw=test-tmp2 -
+                                                       check $? $LINENO
+diff -r test-1 test-tmp2
+                                                       check $? $LINENO
+# skip to extract existent files when archive file is stdin
+rm test-tmp/test-b
+                                                       check $? $LINENO
+cat test-tmp.lzh | $lha xw=test-tmp - 2> test-stderr
+                                                       check $? $LINENO
+diff -r test-1 test-tmp
+                                                       check $? $LINENO
+# 2 files will be skipped.
+test 2 = `grep skip test-stderr | wc -l`
+                                                       check $? $LINENO