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:
10
test/todo-002.sh
Executable file
10
test/todo-002.sh
Executable file
@@ -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
|
||||
Reference in New Issue
Block a user