test/: Add a couple of black-box tests for items

This introduces five test suite failures which will be fixed in one of
the following patches.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
Lukas Fleischer
2013-02-27 11:36:28 +01:00
parent 3d7fdaec58
commit 5501dae328
55 changed files with 251 additions and 0 deletions
+27
View File
@@ -14,6 +14,33 @@ TESTS = \
range-002.sh \
range-003.sh \
appointment-001.sh \
appointment-002.sh \
appointment-003.sh \
appointment-004.sh \
appointment-005.sh \
appointment-006.sh \
appointment-007.sh \
appointment-008.sh \
appointment-009.sh \
appointment-010.sh \
appointment-011.sh \
appointment-012.sh \
appointment-013.sh \
appointment-014.sh \
appointment-015.sh \
appointment-016.sh \
appointment-017.sh \
appointment-018.sh \
appointment-019.sh \
appointment-020.sh \
appointment-021.sh \
appointment-022.sh \
event-001.sh \
event-002.sh \
event-003.sh \
event-004.sh \
event-005.sh \
event-006.sh \
next-001.sh \
search-001.sh \
bug-002.sh \
+14
View File
@@ -0,0 +1,14 @@
#!/bin/sh
if [ "$1" = 'actual' ]; then
"$CALCURSE" --read-only -D "$DATA_DIR"/ -c "$DATA_DIR/apts-appointment-002" \
-d02/23/2013
elif [ "$1" = 'expected' ]; then
cat <<EOD
02/23/13:
- 10:00 -> 12:00
Appointment
EOD
else
./run-test "$0"
fi
+14
View File
@@ -0,0 +1,14 @@
#!/bin/sh
if [ "$1" = 'actual' ]; then
"$CALCURSE" --read-only -D "$DATA_DIR"/ -c "$DATA_DIR/apts-appointment-003" \
-d02/23/2013
elif [ "$1" = 'expected' ]; then
cat <<EOD
02/23/13:
- 10:00 -> ..:..
Appointment
EOD
else
./run-test "$0"
fi
+14
View File
@@ -0,0 +1,14 @@
#!/bin/sh
if [ "$1" = 'actual' ]; then
"$CALCURSE" --read-only -D "$DATA_DIR"/ -c "$DATA_DIR/apts-appointment-004" \
-d02/23/2013
elif [ "$1" = 'expected' ]; then
cat <<EOD
02/23/13:
- ..:.. -> 12:00
Appointment
EOD
else
./run-test "$0"
fi
+14
View File
@@ -0,0 +1,14 @@
#!/bin/sh
if [ "$1" = 'actual' ]; then
"$CALCURSE" --read-only -D "$DATA_DIR"/ -c "$DATA_DIR/apts-appointment-005" \
-d02/23/2013
elif [ "$1" = 'expected' ]; then
cat <<EOD
02/23/13:
- ..:.. -> ..:..
Appointment
EOD
else
./run-test "$0"
fi
+14
View File
@@ -0,0 +1,14 @@
#!/bin/sh
if [ "$1" = 'actual' ]; then
"$CALCURSE" --read-only -D "$DATA_DIR"/ -c "$DATA_DIR/apts-appointment-006" \
-d02/23/2013
elif [ "$1" = 'expected' ]; then
cat <<EOD
02/23/13:
- 10:00 -> 12:00
Appointment
EOD
else
./run-test "$0"
fi
+14
View File
@@ -0,0 +1,14 @@
#!/bin/sh
if [ "$1" = 'actual' ]; then
"$CALCURSE" --read-only -D "$DATA_DIR"/ -c "$DATA_DIR/apts-appointment-007" \
-d02/23/2013
elif [ "$1" = 'expected' ]; then
cat <<EOD
02/23/13:
- 10:00 -> 12:00
Appointment
EOD
else
./run-test "$0"
fi
+5
View File
@@ -0,0 +1,5 @@
#!/bin/sh
"$CALCURSE" --read-only -D "$DATA_DIR"/ -c "$DATA_DIR/apts-appointment-008" \
-d02/23/2013 2>errors && exit 1
grep -Fq 'syntax error in the item date' errors
+5
View File
@@ -0,0 +1,5 @@
#!/bin/sh
"$CALCURSE" --read-only -D "$DATA_DIR"/ -c "$DATA_DIR/apts-appointment-009" \
-d02/23/2013 2>errors && exit 1
grep -Fq 'date error in appointment' errors
+5
View File
@@ -0,0 +1,5 @@
#!/bin/sh
"$CALCURSE" --read-only -D "$DATA_DIR"/ -c "$DATA_DIR/apts-appointment-010" \
-d02/23/2013 2>errors && exit 1
grep -Fq 'no event nor appointment found' errors
+5
View File
@@ -0,0 +1,5 @@
#!/bin/sh
"$CALCURSE" --read-only -D "$DATA_DIR"/ -c "$DATA_DIR/apts-appointment-011" \
-d02/23/2013 2>errors && exit 1
grep -Fq 'syntax error in item time or duration' errors
+5
View File
@@ -0,0 +1,5 @@
#!/bin/sh
"$CALCURSE" --read-only -D "$DATA_DIR"/ -c "$DATA_DIR/apts-appointment-012" \
-d02/23/2013 2>errors && exit 1
grep -Fq 'date error in appointment' errors
+5
View File
@@ -0,0 +1,5 @@
#!/bin/sh
"$CALCURSE" --read-only -D "$DATA_DIR"/ -c "$DATA_DIR/apts-appointment-013" \
-d02/23/2013 2>errors && exit 1
grep -Fq 'syntax error in item time or duration' errors
+5
View File
@@ -0,0 +1,5 @@
#!/bin/sh
"$CALCURSE" --read-only -D "$DATA_DIR"/ -c "$DATA_DIR/apts-appointment-014" \
-d02/23/2013 2>errors && exit 1
grep -Fq 'syntax error in item time or duration' errors
+5
View File
@@ -0,0 +1,5 @@
#!/bin/sh
"$CALCURSE" --read-only -D "$DATA_DIR"/ -c "$DATA_DIR/apts-appointment-015" \
-d02/23/2013 2>errors && exit 1
grep -Fq 'syntax error in item time or duration' errors
+5
View File
@@ -0,0 +1,5 @@
#!/bin/sh
"$CALCURSE" --read-only -D "$DATA_DIR"/ -c "$DATA_DIR/apts-appointment-016" \
-d02/23/2013 2>errors && exit 1
grep -Fq 'date error in appointment' errors
+5
View File
@@ -0,0 +1,5 @@
#!/bin/sh
"$CALCURSE" --read-only -D "$DATA_DIR"/ -c "$DATA_DIR/apts-appointment-017" \
-d02/23/2013 2>errors && exit 1
grep -Fq 'syntax error in item time or duration' errors
+5
View File
@@ -0,0 +1,5 @@
#!/bin/sh
"$CALCURSE" --read-only -D "$DATA_DIR"/ -c "$DATA_DIR/apts-appointment-018" \
-d02/23/2013 2>errors && exit 1
grep -Fq 'syntax error in item time or duration' errors
+5
View File
@@ -0,0 +1,5 @@
#!/bin/sh
"$CALCURSE" --read-only -D "$DATA_DIR"/ -c "$DATA_DIR/apts-appointment-019" \
-d02/23/2013 2>errors && exit 1
grep -Fq 'date error in appointment' errors
+5
View File
@@ -0,0 +1,5 @@
#!/bin/sh
"$CALCURSE" --read-only -D "$DATA_DIR"/ -c "$DATA_DIR/apts-appointment-020" \
-d02/23/2013 2>errors && exit 1
grep -Fq 'syntax error in item repetition' errors
+5
View File
@@ -0,0 +1,5 @@
#!/bin/sh
"$CALCURSE" --read-only -D "$DATA_DIR"/ -c "$DATA_DIR/apts-appointment-021" \
-d02/23/2013 2>errors && exit 1
grep -Fq 'date error in appointment' errors
+5
View File
@@ -0,0 +1,5 @@
#!/bin/sh
"$CALCURSE" --read-only -D "$DATA_DIR"/ -c "$DATA_DIR/apts-appointment-022" \
-d02/23/2013 2>errors && exit 1
grep -Fq 'date error in appointment' errors
+1
View File
@@ -0,0 +1 @@
02/23/2013 @ 10:00 -> 02/23/2013 @ 12:00 |Appointment
+1
View File
@@ -0,0 +1 @@
02/23/2013 @ 10:00 -> 02/24/2013 @ 12:00 |Appointment
+1
View File
@@ -0,0 +1 @@
02/22/2013 @ 10:00 -> 02/23/2013 @ 12:00 |Appointment
+1
View File
@@ -0,0 +1 @@
02/22/2013 @ 10:00 -> 02/24/2013 @ 12:00 |Appointment
+1
View File
@@ -0,0 +1 @@
02/23/2013 @ 10:00 -> 02/23/2013 @ 12:00 !Appointment
+1
View File
@@ -0,0 +1 @@
02/23/2013 @ 10:00 -> 02/23/2013 @ 12:00 >ce96f39624a379da19b5549bad6b9a8beed24403 |Appointment
+1
View File
@@ -0,0 +1 @@
02.23.2013 @ 10:00 -> 02/23/2013 @ 12:00 |Appointment
+1
View File
@@ -0,0 +1 @@
01/32/2013 @ 10:00 -> 02/23/2013 @ 12:00 |Appointment
+1
View File
@@ -0,0 +1 @@
02/23/2013 . 10:00 -> 02/23/2013 @ 12:00 |Appointment
+1
View File
@@ -0,0 +1 @@
02/23/2013 @ 10.00 -> 02/23/2013 @ 12:00 |Appointment
+1
View File
@@ -0,0 +1 @@
02/22/2013 @ 24:00 -> 02/23/2013 @ 12:00 |Appointment
+1
View File
@@ -0,0 +1 @@
02/23/2013 @ 10:00 .> 02/23/2013 @ 12:00 |Appointment
+1
View File
@@ -0,0 +1 @@
02/23/2013 @ 10:00 -. 02/23/2013 @ 12:00 |Appointment
+1
View File
@@ -0,0 +1 @@
02/23/2013 @ 10:00 -> 02.23.2013 @ 12:00 |Appointment
+1
View File
@@ -0,0 +1 @@
02/23/2013 @ 10:00 -> 02/29/2013 @ 12:00 |Appointment
+1
View File
@@ -0,0 +1 @@
02/23/2013 @ 10:00 -> 02/23/2013 . 12:00 |Appointment
+1
View File
@@ -0,0 +1 @@
02/23/2013 @ 10:00 -> 02/23/2013 @ 12.00 |Appointment
+1
View File
@@ -0,0 +1 @@
02/23/2013 @ 10:00 -> 02/23/2013 @ 24:00 |Appointment
+1
View File
@@ -0,0 +1 @@
02/23/2013 @ 10:00 -> 02/23/2013 @ 12:00 .Appointment
+1
View File
@@ -0,0 +1 @@
02/23/2013 @ 10:00 -> 02/23/2013 @ 08:00 |Appointment
+1
View File
@@ -0,0 +1 @@
02/23/2013 @ 10:00 -> 02/22/2013 @ 12:00 |Appointment
+1
View File
@@ -0,0 +1 @@
02/23/2013 [1] Event
+1
View File
@@ -0,0 +1 @@
02.23.2013 [1] Event
+1
View File
@@ -0,0 +1 @@
02/29/2013 [1] Event
+1
View File
@@ -0,0 +1 @@
02/23/2013 .1] Event
+1
View File
@@ -0,0 +1 @@
02/23/2013 [.] Event
+1
View File
@@ -0,0 +1 @@
02/23/2013 [1. Event
+13
View File
@@ -0,0 +1,13 @@
#!/bin/sh
if [ "$1" = 'actual' ]; then
"$CALCURSE" --read-only -D "$DATA_DIR"/ -c "$DATA_DIR/apts-event-001" \
-d02/23/2013
elif [ "$1" = 'expected' ]; then
cat <<EOD
02/23/13:
* Event
EOD
else
./run-test "$0"
fi
+5
View File
@@ -0,0 +1,5 @@
#!/bin/sh
"$CALCURSE" --read-only -D "$DATA_DIR"/ -c "$DATA_DIR/apts-event-002" \
-d02/23/2013 2>errors && exit 1
grep -Fq 'syntax error in the item date' errors
+5
View File
@@ -0,0 +1,5 @@
#!/bin/sh
"$CALCURSE" --read-only -D "$DATA_DIR"/ -c "$DATA_DIR/apts-event-003" \
-d02/23/2013 2>errors && exit 1
grep -Fq 'date error in event' errors
+5
View File
@@ -0,0 +1,5 @@
#!/bin/sh
"$CALCURSE" --read-only -D "$DATA_DIR"/ -c "$DATA_DIR/apts-event-004" \
-d02/23/2013 2>errors && exit 1
grep -Fq 'no event nor appointment found' errors
+5
View File
@@ -0,0 +1,5 @@
#!/bin/sh
"$CALCURSE" --read-only -D "$DATA_DIR"/ -c "$DATA_DIR/apts-event-005" \
-d02/23/2013 2>errors && exit 1
grep -Fq 'syntax error in item identifier' errors
+5
View File
@@ -0,0 +1,5 @@
#!/bin/sh
"$CALCURSE" --read-only -D "$DATA_DIR"/ -c "$DATA_DIR/apts-event-006" \
-d02/23/2013 2>errors && exit 1
grep -Fq 'syntax error in item identifier' errors