aboutsummaryrefslogtreecommitdiffstats
path: root/test/02_list
diff options
context:
space:
mode:
authorgramanas <anastasis.gramm2@gmail.com>2018-10-23 17:42:28 +0300
committergramanas <anastasis.gramm2@gmail.com>2018-10-23 17:42:28 +0300
commit46421fedf6fe291bfcb63482f3bfa9bb2c7fdff6 (patch)
tree53d85f05c362230a428ca5593125ba1a1341799d /test/02_list
parent410bb2715ce7c9f8d796704395cb44d76e2e884c (diff)
downloadck-46421fedf6fe291bfcb63482f3bfa9bb2c7fdff6.tar.gz
ck-46421fedf6fe291bfcb63482f3bfa9bb2c7fdff6.tar.bz2
ck-46421fedf6fe291bfcb63482f3bfa9bb2c7fdff6.zip
Remove site clutter and rename test folder (tests -> test)
Diffstat (limited to 'test/02_list')
-rw-r--r--test/02_list27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/02_list b/test/02_list
new file mode 100644
index 0000000..e330dad
--- /dev/null
+++ b/test/02_list
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+init list
+
+# add configs to ck
+path1=$BIN/test1.conf
+path2=$BIN/test2.conf
+path3=$BIN/test3.conf
+
+add_config prog1 $path1
+add_config prog2 $path2
+add_config prog3 $path3
+
+for i in $($BIN/ck -c $BIN list paths); do
+ if [[ "$i" != "$path1" ]] && [[ "$i" != "$path2" ]] && [[ "$i" != "$path3" ]]; then
+ err "Listing paths"
+ fi
+done
+
+for i in $($BIN/ck -c $BIN list programs); do
+ if [[ "$i" != "prog1" ]] && [[ "$i" != "prog2" ]] && [[ "$i" != "prog3" ]]; then
+ err "Listing programs"
+ fi
+done
+
+clear_tests
+echo -e $PASS