summaryrefslogtreecommitdiff
path: root/tests/tests.sh
diff options
context:
space:
mode:
authorTobias Brox <tobias@redpill-linpro.com>2022-05-29 16:20:39 +0200
committerTobias Brox <tobias@redpill-linpro.com>2022-05-29 16:20:39 +0200
commitfd834cd17933bad5567f1315ddc800145081dcd6 (patch)
tree49692213cc5e9b408ee2cb75bd8b1f622d058746 /tests/tests.sh
parent36fbbe2654d2f73a7583d9538787fd807b781b0e (diff)
downloadcalendar-cli-fd834cd17933bad5567f1315ddc800145081dcd6.zip
some work on the testing script. (This should be cleaned up and made more readable and modular ... but how?)
Diffstat (limited to 'tests/tests.sh')
-rwxr-xr-xtests/tests.sh24
1 files changed, 23 insertions, 1 deletions
diff --git a/tests/tests.sh b/tests/tests.sh
index 1370578..bd1fbfb 100755
--- a/tests/tests.sh
+++ b/tests/tests.sh
@@ -12,7 +12,28 @@ do
[ -f $setup ] && source $setup
done
-echo "## CLEANUP from earlier failed test runs"
+if [ -z "$RUNTESTSNOPAUSE" ]
+then
+ echo "tests.sh"
+ echo
+ echo "Generally, tests.sh should only be run directly if you know what you are doing"
+ echo "You may want to use test_calendar-cli.sh instead"
+ echo
+ echo "This script will use the following commands to access a calendar server:"
+ echo
+ echo "$calendar_cli"
+ echo "$kal"
+ echo
+ echo "This may work if you have configured a calendar server."
+ echo "The tests will add and delete events and tasks."
+ echo "Content from 2010-10 may be deleted"
+ echo
+ echo "Press enter or ctrl-C"
+ read foo
+fi
+
+
+echo "## CLEANUP from earlier failed test runs, if any"
QUIET=true
for uid in $($calendar_cli calendar agenda --from-time=2010-10-09 --agenda-days=5 --event-template='{uid}') ; do calendar_cli calendar delete --event-uid=$uid ; done
@@ -55,6 +76,7 @@ echo $output | { grep -q $uid2 && echo "## OK: found the UID" ; } || error "didn
echo "## Deleting events with uid $uid $uid1 $uid2"
calendar_cli calendar delete --event-uid=$uid
calendar_cli calendar delete --event-uid=$uid2
+calendar_cli calendar delete --event-uid=$uid3
kal select --uid=$uid3 delete
echo "## Searching again for the deleted event"
calendar_cli calendar agenda --from-time=2010-10-10 --agenda-days=3