OSDN Git Service

should include sys/types.h for mode_t
[lha/olha.git] / test.sh
diff --git a/test.sh b/test.sh
index 9a296d3..924f88c 100644 (file)
--- a/test.sh
+++ b/test.sh
@@ -2,15 +2,22 @@
 
 set -ex
 
+VALGRIND=
+if [ "$1" = -v ]; then
+  if which valgrind 2>/dev/null; then
+    VALGRIND="valgrind -q"
+  fi
+fi
+
 if [ -f olha.exe ]; then
   cp olha.exe olha2
 else
   cp olha olha2
 fi
-./olha a foo.lzh olha2
+$VALGRIND ./olha a foo.lzh olha2
 lha t foo.lzh
 ./olha l foo.lzh
-./olha x foo.lzh olha2
+./olha xf foo.lzh olha2
 if [ -f olha.exe ]; then
   diff olha.exe olha2
 else