aboutsummaryrefslogtreecommitdiffstats
path: root/test/search.sh
diff options
context:
space:
mode:
authorgramanas <anastasis.gramm2@gmail.com>2018-11-19 19:11:06 +0200
committergramanas <anastasis.gramm2@gmail.com>2018-11-19 19:11:06 +0200
commit78ee1c72c670a71bfd165448676fc65bff802916 (patch)
tree893b0f09dfc84f3fd7f1ac218213012f33d5b612 /test/search.sh
parent84bbbb91c9154ca0b1c295eb7d1aa0de59450764 (diff)
downloadck-78ee1c72c670a71bfd165448676fc65bff802916.tar.gz
ck-78ee1c72c670a71bfd165448676fc65bff802916.tar.bz2
ck-78ee1c72c670a71bfd165448676fc65bff802916.zip
Add ability to use ck without secret dir
Diffstat (limited to 'test/search.sh')
-rw-r--r--test/search.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/search.sh b/test/search.sh
new file mode 100644
index 0000000..a315730
--- /dev/null
+++ b/test/search.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+init search
+
+# setup test configs
+path1=$BIN/test1.conf
+path2=$BIN/test2.conf
+path3=$BIN/test3.conf
+path4=$BIN/test4.conf
+
+add_config prog1 $path1 "search-term"
+add_config prog1 $path2 "search-term"
+add_config prog2 $path3 "search-term"
+add_config prog3 $path4 "search-term"
+
+# search
+if [[ $($BIN/ck -c $BIN search search-term | wc -l) != 4 ]]; then
+ err "search failed."
+fi
+
+clear_tests
+echo -e $PASS