From 32530f0e50ba5cd4e3259f8f1868e28ae375ef20 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Sat, 21 Jan 2012 15:28:51 +0100 Subject: 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" 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 --- test/todo-002.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 test/todo-002.sh (limited to 'test/todo-002.sh') 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 -- cgit v1.2.3-54-g00ecf