diff options
author | Lukas Fleischer <calcurse@cryptocrack.de> | 2012-01-21 15:28:51 +0100 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2012-01-22 00:13:35 +0100 |
commit | 32530f0e50ba5cd4e3259f8f1868e28ae375ef20 (patch) | |
tree | 6881ac69392cdb55698d38d3792d3c6dc269fdb5 /test/todo-002.sh | |
parent | 31b4c71eb2610471cb0598338f510633f407477f (diff) | |
download | calcurse-32530f0e50ba5cd4e3259f8f1868e28ae375ef20.zip |
test/: Add generic tests for todo operations
* todo-001.sh: Tests the "-t" command line option (calculates expected
output by parsing the todo data file).
* todo-002.sh: Tests "-t<num>" in a way similar to todo-001.sh.
* todo-003.sh: Tests "-t0" in a way similar to todo-001.sh.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'test/todo-002.sh')
-rwxr-xr-x | test/todo-002.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/todo-002.sh b/test/todo-002.sh new file mode 100755 index 0000000..c2718a9 --- /dev/null +++ b/test/todo-002.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +if [ "$1" = 'actual' ]; then + calcurse -D data/ -t3 +elif [ "$1" = 'expected' ]; then + echo 'to do:' + sed -n 's/^\[3\] \(.*\)/3. \1/p' data/todo +else + ./run-test "$0" +fi |