summaryrefslogtreecommitdiffstats
path: root/konsolekalendar/examples/testkalendar.sh
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit460c52653ab0dcca6f19a4f492ed2c5e4e963ab0 (patch)
tree67208f7c145782a7e90b123b982ca78d88cc2c87 /konsolekalendar/examples/testkalendar.sh
downloadtdepim-460c52653ab0dcca6f19a4f492ed2c5e4e963ab0.tar.gz
tdepim-460c52653ab0dcca6f19a4f492ed2c5e4e963ab0.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'konsolekalendar/examples/testkalendar.sh')
-rw-r--r--konsolekalendar/examples/testkalendar.sh77
1 files changed, 77 insertions, 0 deletions
diff --git a/konsolekalendar/examples/testkalendar.sh b/konsolekalendar/examples/testkalendar.sh
new file mode 100644
index 000000000..259d2840c
--- /dev/null
+++ b/konsolekalendar/examples/testkalendar.sh
@@ -0,0 +1,77 @@
+#!/bin/sh
+##########################################################################################
+#
+# ***************************************************************************
+# * *
+# * This program is free software; you can redistribute it and/or modify *
+# * it under the terms of the GNU General Public License as published by *
+# * the Free Software Foundation; either version 2 of the License, or *
+# * (at your option) any later version. *
+# * *
+# ***************************************************************************
+#
+##########################################################################################
+#
+# Purpose of this program is to test konsolekalendar in future this will be more smarter
+#
+# testkalendar.sh 0.1
+#
+##########################################################################################
+
+#!/bin/sh
+
+function do_test(){
+
+DATE=10
+MONTH=10
+YEAR=2003
+
+MINUTE=1
+HOUR=20
+
+while [ $DATE -lt 29 ]; do
+
+
+COMMAND="$KONSOLEKALENDAR $1 --time $HOUR:$MINUTE --description $3 --summary $3 --date $YEAR-$MONTH-$DATE --create --file=$2"
+echo using command $COMMAND
+$COMMAND
+
+echo "################################ TEXT ##################################"
+COMMAND="$KONSOLEKALENDAR --view --time $HOUR:$MINUTE --date $YEAR-$MONTH-$DATE --export-type Text --file=$2"
+$COMMAND
+
+echo "################################ HTML ##################################"
+COMMAND="$KONSOLEKALENDAR --view --time $HOUR:$MINUTE --date $YEAR-$MONTH-$DATE --export-type HTML --file=$2"
+$COMMAND
+
+
+echo "################################ CSV ##################################"
+COMMAND="$KONSOLEKALENDAR --view --time $HOUR:$MINUTE --date $YEAR-$MONTH-$DATE --export-type CSV --file=$2"
+$COMMAND
+
+echo "################################ ORG ##################################"
+COMMAND="$KONSOLEKALENDAR --view --time $HOUR:$MINUTE --date $YEAR-$MONTH-$DATE --export-type Text-organizer --file=$2"
+$COMMAND
+
+let DATE=$DATE+1
+let MINUTE=$MINUTE+1
+
+done
+}
+
+
+KONSOLEKALENDAR=../konsolekalendar
+ADDING="--add"
+REMOVE="--delete"
+CHANGE="--change"
+VIEW="--view"
+
+COMMAND="";
+
+FILE="./testcaledar.ics"
+
+do_test $ADDING $FILE "ADD"
+do_test $CHANGE $FILE "CHANGE"
+do_test $REMOVE $FILE "REMOVE"
+
+