aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/init
diff options
context:
space:
mode:
authorgramanas <anastasis.gramm2@gmail.com>2018-04-15 01:57:16 +0300
committergramanas <anastasis.gramm2@gmail.com>2018-04-15 01:57:16 +0300
commitac34419be8a56d86a395a6ef0ce86c89b25ddd55 (patch)
tree2024d4014a1d42957d029af407160a6ce3094417 /src/tests/init
parentbc25e14b448edb9f41260a23cf6567e6632db267 (diff)
downloadck-ac34419be8a56d86a395a6ef0ce86c89b25ddd55.tar.gz
ck-ac34419be8a56d86a395a6ef0ce86c89b25ddd55.tar.bz2
ck-ac34419be8a56d86a395a6ef0ce86c89b25ddd55.zip
add testing
Diffstat (limited to 'src/tests/init')
-rwxr-xr-xsrc/tests/init23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/tests/init b/src/tests/init
new file mode 100755
index 0000000..2091bdc
--- /dev/null
+++ b/src/tests/init
@@ -0,0 +1,23 @@
+#!/bin/bash
+BIN=/build/ck
+
+TEST_LOCATION=@PROJECT_TESTING_GROUNDS@
+mkdir -p $TEST_LOCATION/vc
+mkdir $TEST_LOCATION/sec
+
+exec $BIN/ck init $TEST_LOCATION/vc $TEST_LOCATION/sec > /dev/null 2>&1 &
+wait $!
+
+if [ ! -f ~/.ck/ckrc ]; then
+ echo -e $ERROR"Config file not created."
+ exit 1
+fi
+
+if [ ! -f ~/.ck/ckdb ]; then
+ echo -e $ERROR"DB file not created."
+ exit 1
+fi
+
+rm -rf $HOME/.ck
+rm -rf $TEST_LOCATION
+echo -e $PASS