浏览代码

new tests

Bertrand Gouny 11 年之前
父节点
当前提交
940c5afc4f
共有 2 个文件被更改,包括 10 次插入10 次删除
  1. 4 4
      test.sh
  2. 6 6
      test/tools/run.sh

+ 4 - 4
test.sh

@@ -6,10 +6,10 @@
 
 . test/tools/run.sh
 
-run_test tools/build-container "Successfully built"
-run_test simple "dn: dc=example,dc=com"
-run_test tls "dn: dc=example,dc=com"
-run_test db "dn: dc=otherdomain,dc=com"
+run_test tools/build-container.sh "Successfully built"
+run_test simple.sh "dn: dc=example,dc=com"
+run_test tls.sh "dn: dc=example,dc=com"
+run_test db.sh "dn: dc=otherdomain,dc=com"
 
 . test/tools/end.sh
 

+ 6 - 6
test/tools/run.sh

@@ -23,21 +23,21 @@ echo_ok () {
 }
 
 run_test () {
-  fction=$1
+  test=$1
   out=test/test.out
 
-  echo_start $fction
+  echo_start $test
 
   if [ -z ${verbose} ]; then
-    ./test/$1.sh > $out 2>&1
+    ./test/$test > $out 2>&1
   else
-    ./test/$1.sh | tee $out 2>&1
+    ./test/$test | tee $out 2>&1
   fi
   
   if [ "$(grep -c "$2" $out)" -eq 0 ]; then
-    echo_error $fction
+    echo_error $test
   else
-    echo_ok  $fction
+    echo_ok  $test
   fi
 
   rm $out