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>
This commit is contained in:
12
test/todo-003.sh
Executable file
12
test/todo-003.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ "$1" = 'actual' ]; then
|
||||
calcurse -D data/ -t0 | sort -n
|
||||
elif [ "$1" = 'expected' ]; then
|
||||
(
|
||||
echo 'completed tasks:'
|
||||
sed -n 's/^\[-\([0-9]\)\] \(.*\)/\1. \2/p' data/todo
|
||||
) | sort -n
|
||||
else
|
||||
./run-test "$0"
|
||||
fi
|
||||
Reference in New Issue
Block a user