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:
parent
3d7fdaec58
commit
5501dae328
@ -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
test/appointment-002.sh
Executable file
14
test/appointment-002.sh
Executable 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
test/appointment-003.sh
Executable file
14
test/appointment-003.sh
Executable 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
test/appointment-004.sh
Executable file
14
test/appointment-004.sh
Executable 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
test/appointment-005.sh
Executable file
14
test/appointment-005.sh
Executable 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
test/appointment-006.sh
Executable file
14
test/appointment-006.sh
Executable 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
test/appointment-007.sh
Executable file
14
test/appointment-007.sh
Executable 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
test/appointment-008.sh
Executable file
5
test/appointment-008.sh
Executable 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
test/appointment-009.sh
Executable file
5
test/appointment-009.sh
Executable 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
test/appointment-010.sh
Executable file
5
test/appointment-010.sh
Executable 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
test/appointment-011.sh
Executable file
5
test/appointment-011.sh
Executable 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
test/appointment-012.sh
Executable file
5
test/appointment-012.sh
Executable 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
test/appointment-013.sh
Executable file
5
test/appointment-013.sh
Executable 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
test/appointment-014.sh
Executable file
5
test/appointment-014.sh
Executable 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
test/appointment-015.sh
Executable file
5
test/appointment-015.sh
Executable 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
test/appointment-016.sh
Executable file
5
test/appointment-016.sh
Executable 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
test/appointment-017.sh
Executable file
5
test/appointment-017.sh
Executable 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
test/appointment-018.sh
Executable file
5
test/appointment-018.sh
Executable 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
test/appointment-019.sh
Executable file
5
test/appointment-019.sh
Executable 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
test/appointment-020.sh
Executable file
5
test/appointment-020.sh
Executable 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
test/appointment-021.sh
Executable file
5
test/appointment-021.sh
Executable 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
test/appointment-022.sh
Executable file
5
test/appointment-022.sh
Executable 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
test/data/apts-appointment-002
Normal file
1
test/data/apts-appointment-002
Normal file
@ -0,0 +1 @@
|
||||
02/23/2013 @ 10:00 -> 02/23/2013 @ 12:00 |Appointment
|
1
test/data/apts-appointment-003
Normal file
1
test/data/apts-appointment-003
Normal file
@ -0,0 +1 @@
|
||||
02/23/2013 @ 10:00 -> 02/24/2013 @ 12:00 |Appointment
|
1
test/data/apts-appointment-004
Normal file
1
test/data/apts-appointment-004
Normal file
@ -0,0 +1 @@
|
||||
02/22/2013 @ 10:00 -> 02/23/2013 @ 12:00 |Appointment
|
1
test/data/apts-appointment-005
Normal file
1
test/data/apts-appointment-005
Normal file
@ -0,0 +1 @@
|
||||
02/22/2013 @ 10:00 -> 02/24/2013 @ 12:00 |Appointment
|
1
test/data/apts-appointment-006
Normal file
1
test/data/apts-appointment-006
Normal file
@ -0,0 +1 @@
|
||||
02/23/2013 @ 10:00 -> 02/23/2013 @ 12:00 !Appointment
|
1
test/data/apts-appointment-007
Normal file
1
test/data/apts-appointment-007
Normal file
@ -0,0 +1 @@
|
||||
02/23/2013 @ 10:00 -> 02/23/2013 @ 12:00 >ce96f39624a379da19b5549bad6b9a8beed24403 |Appointment
|
1
test/data/apts-appointment-008
Normal file
1
test/data/apts-appointment-008
Normal file
@ -0,0 +1 @@
|
||||
02.23.2013 @ 10:00 -> 02/23/2013 @ 12:00 |Appointment
|
1
test/data/apts-appointment-009
Normal file
1
test/data/apts-appointment-009
Normal file
@ -0,0 +1 @@
|
||||
01/32/2013 @ 10:00 -> 02/23/2013 @ 12:00 |Appointment
|
1
test/data/apts-appointment-010
Normal file
1
test/data/apts-appointment-010
Normal file
@ -0,0 +1 @@
|
||||
02/23/2013 . 10:00 -> 02/23/2013 @ 12:00 |Appointment
|
1
test/data/apts-appointment-011
Normal file
1
test/data/apts-appointment-011
Normal file
@ -0,0 +1 @@
|
||||
02/23/2013 @ 10.00 -> 02/23/2013 @ 12:00 |Appointment
|
1
test/data/apts-appointment-012
Normal file
1
test/data/apts-appointment-012
Normal file
@ -0,0 +1 @@
|
||||
02/22/2013 @ 24:00 -> 02/23/2013 @ 12:00 |Appointment
|
1
test/data/apts-appointment-013
Normal file
1
test/data/apts-appointment-013
Normal file
@ -0,0 +1 @@
|
||||
02/23/2013 @ 10:00 .> 02/23/2013 @ 12:00 |Appointment
|
1
test/data/apts-appointment-014
Normal file
1
test/data/apts-appointment-014
Normal file
@ -0,0 +1 @@
|
||||
02/23/2013 @ 10:00 -. 02/23/2013 @ 12:00 |Appointment
|
1
test/data/apts-appointment-015
Normal file
1
test/data/apts-appointment-015
Normal file
@ -0,0 +1 @@
|
||||
02/23/2013 @ 10:00 -> 02.23.2013 @ 12:00 |Appointment
|
1
test/data/apts-appointment-016
Normal file
1
test/data/apts-appointment-016
Normal file
@ -0,0 +1 @@
|
||||
02/23/2013 @ 10:00 -> 02/29/2013 @ 12:00 |Appointment
|
1
test/data/apts-appointment-017
Normal file
1
test/data/apts-appointment-017
Normal file
@ -0,0 +1 @@
|
||||
02/23/2013 @ 10:00 -> 02/23/2013 . 12:00 |Appointment
|
1
test/data/apts-appointment-018
Normal file
1
test/data/apts-appointment-018
Normal file
@ -0,0 +1 @@
|
||||
02/23/2013 @ 10:00 -> 02/23/2013 @ 12.00 |Appointment
|
1
test/data/apts-appointment-019
Normal file
1
test/data/apts-appointment-019
Normal file
@ -0,0 +1 @@
|
||||
02/23/2013 @ 10:00 -> 02/23/2013 @ 24:00 |Appointment
|
1
test/data/apts-appointment-020
Normal file
1
test/data/apts-appointment-020
Normal file
@ -0,0 +1 @@
|
||||
02/23/2013 @ 10:00 -> 02/23/2013 @ 12:00 .Appointment
|
1
test/data/apts-appointment-021
Normal file
1
test/data/apts-appointment-021
Normal file
@ -0,0 +1 @@
|
||||
02/23/2013 @ 10:00 -> 02/23/2013 @ 08:00 |Appointment
|
1
test/data/apts-appointment-022
Normal file
1
test/data/apts-appointment-022
Normal file
@ -0,0 +1 @@
|
||||
02/23/2013 @ 10:00 -> 02/22/2013 @ 12:00 |Appointment
|
1
test/data/apts-event-001
Normal file
1
test/data/apts-event-001
Normal file
@ -0,0 +1 @@
|
||||
02/23/2013 [1] Event
|
1
test/data/apts-event-002
Normal file
1
test/data/apts-event-002
Normal file
@ -0,0 +1 @@
|
||||
02.23.2013 [1] Event
|
1
test/data/apts-event-003
Normal file
1
test/data/apts-event-003
Normal file
@ -0,0 +1 @@
|
||||
02/29/2013 [1] Event
|
1
test/data/apts-event-004
Normal file
1
test/data/apts-event-004
Normal file
@ -0,0 +1 @@
|
||||
02/23/2013 .1] Event
|
1
test/data/apts-event-005
Normal file
1
test/data/apts-event-005
Normal file
@ -0,0 +1 @@
|
||||
02/23/2013 [.] Event
|
1
test/data/apts-event-006
Normal file
1
test/data/apts-event-006
Normal file
@ -0,0 +1 @@
|
||||
02/23/2013 [1. Event
|
13
test/event-001.sh
Executable file
13
test/event-001.sh
Executable 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
test/event-002.sh
Executable file
5
test/event-002.sh
Executable 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
test/event-003.sh
Executable file
5
test/event-003.sh
Executable 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
test/event-004.sh
Executable file
5
test/event-004.sh
Executable 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
test/event-005.sh
Executable file
5
test/event-005.sh
Executable 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
test/event-006.sh
Executable file
5
test/event-006.sh
Executable 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
|
Loading…
x
Reference in New Issue
Block a user