diff options
author | Anastasis Grammenos <anastasis.gramm2@gmail.com> | 2018-10-07 14:10:52 +0300 |
---|---|---|
committer | Anastasis Grammenos <anastasis.gramm2@gmail.com> | 2018-10-07 14:10:52 +0300 |
commit | d202883e6d642ba5a973996654cfed674420da22 (patch) | |
tree | 498b07bbba9d16a76cf06d84e45929540222dc87 /tests/02_list | |
parent | a0db476bed7d7b814c426d23b55a74d585a6d8cb (diff) | |
download | ck-d202883e6d642ba5a973996654cfed674420da22.tar.gz ck-d202883e6d642ba5a973996654cfed674420da22.tar.bz2 ck-d202883e6d642ba5a973996654cfed674420da22.zip |
Update regression tests
Diffstat (limited to 'tests/02_list')
-rw-r--r-- | tests/02_list | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/02_list b/tests/02_list new file mode 100644 index 0000000..014ae62 --- /dev/null +++ b/tests/02_list @@ -0,0 +1,32 @@ +#!/bin/bash + +init list + +# setup test configs +echo "Test 1" > $BIN/test1.conf +echo "Test 2" > $BIN/test2.conf +echo "Test 3" > $BIN/test3.conf + +# 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 conf $BIN list paths); do + if [[ "$i" != "$path1" ]] && [[ "$i" != "$path2" ]] && [[ "$i" != "$path3" ]]; then + echo "path good"; + fi +done + +for i in $($BIN/ck conf $BIN list programs); do + if [[ "$i" != "prog1" ]] && [[ "$i" != "prog2" ]] && [[ "$i" != "prog3" ]]; then + echo "program good"; + fi +done + +clear_tests +echo -e $PASS |