]> Nishi Git Mirror - gwion.git/commitdiff
:white_check_mark: Yet more tests
authorfennecdjay <astor.jeremie@wanadoo.fr>
Sun, 7 Jul 2019 20:05:03 +0000 (22:05 +0200)
committerfennecdjay <astor.jeremie@wanadoo.fr>
Sun, 7 Jul 2019 20:05:03 +0000 (22:05 +0200)
tests/sh/common.sh
tests/sh/opt.sh

index e6b84272e033f5b340bc0916a25723f96a81928f..74cef1026df6cb1ba481b999e1dea27212dc8c0b 100644 (file)
@@ -11,8 +11,10 @@ run() {
     good="All heap blocks were freed -- no leaks are possible"
     n=$(printf "% 4i" "$1")
     eval valgrind ./gwion "$OPT" "$UDP" -d "$DRIVER" "$3" &> "$4"
-    ok=0
-    grep "$good" "$4" > /dev/null && ok=1
+    if [ -f "$4" ]
+    then grep "$good" "$4" > /dev/null && ok=1
+    else ok=1
+    fi
     if [ $ok ]
     then echo "ok $n $2"
     else echo "not ok $n $2"
index 478a8ecfa88ba8a2a5a1eb5c387426a7e97ed2ae..eca7fa7ccdef4f2dade41a064e68daf3a1c16db7 100644 (file)
@@ -1,5 +1,5 @@
 #!/bin/bash
-# [test] #11
+# [test] #12
 n=0
 [ "$1" ] && n="$1"
 [ "$n" -eq 0 ] && n=1
@@ -53,4 +53,12 @@ run "$n" "plugin directory" "-p non_existant_dir" "file"
 
 # config
 n=$((n+1))
-run "$n" "config" "-k" "file"
+cat << EOF >> tmp_gwionrc
+-p.
+-l0
+EOF
+run "$n" "config" "-c tmp_gwionrc" "file"
+
+# loop
+n=$((n+1))
+run "$n" "loop" "-l0" "file"