aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2012-06-27 12:17:12 +0200
committerLukas Fleischer <calcurse@cryptocrack.de>2012-06-30 14:34:37 +0200
commitb526d46fae3c9c18b532f808687f3afdafbd1ce4 (patch)
treee8bac83f85ef9a0a1d218aa97643c95a3ad40ae7 /test
parent86c465b0e50e1479e819f63c0bac86e7aec236a1 (diff)
downloadcalcurse-b526d46fae3c9c18b532f808687f3afdafbd1ce4.tar.gz
calcurse-b526d46fae3c9c18b532f808687f3afdafbd1ce4.zip
Add a test case to reproduce BUG#2
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'test')
-rw-r--r--test/Makefile.am3
-rwxr-xr-xtest/bug-002.sh16
-rw-r--r--test/data/apts-bug-0022
3 files changed, 20 insertions, 1 deletions
diff --git a/test/Makefile.am b/test/Makefile.am
index 85c8a1d..354a46e 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -15,7 +15,8 @@ TESTS = \
range-003.sh \
appointment-001.sh \
next-001.sh \
- search-001.sh
+ search-001.sh \
+ bug-002.sh
TESTS_ENVIRONMENT = \
CALCURSE='$(top_builddir)/src/calcurse' \
diff --git a/test/bug-002.sh b/test/bug-002.sh
new file mode 100755
index 0000000..4784b59
--- /dev/null
+++ b/test/bug-002.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+if [ "$1" = 'actual' ]; then
+ "$CALCURSE" --read-only -D "$DATA_DIR"/ -c "$DATA_DIR/apts-bug-002" \
+ -d05/03/2012
+elif [ "$1" = 'expected' ]; then
+ cat <<EOD
+05/03/12:
+ - 10:45 -> 12:45
+ Quantum Mechanics
+ - 18:30 -> 21:30
+ German Class
+EOD
+else
+ ./run-test "$0"
+fi
diff --git a/test/data/apts-bug-002 b/test/data/apts-bug-002
new file mode 100644
index 0000000..6ced520
--- /dev/null
+++ b/test/data/apts-bug-002
@@ -0,0 +1,2 @@
+03/22/2012 @ 18:30 -> 03/22/2012 @ 21:30 {1W -> 06/21/2012} |German Class
+04/19/2012 @ 10:45 -> 04/19/2012 @ 12:45 {1W -> 05/06/2012} |Quantum Mechanics