From 5491e458a279c8f692b54fae34b591f4040f1eb2 Mon Sep 17 00:00:00 2001 From: Emil Sit Date: Mon, 23 Mar 2009 20:34:01 -0400 Subject: [PATCH] tests: Simple null test of all list commands Signed-off-by: Emil Sit --- tests/t0001-null.sh | 101 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100755 tests/t0001-null.sh diff --git a/tests/t0001-null.sh b/tests/t0001-null.sh new file mode 100755 index 0000000..acfc01b --- /dev/null +++ b/tests/t0001-null.sh @@ -0,0 +1,101 @@ +#!/bin/sh + +test_description='todo.sh basic null functionality test. + +This test just makes sure the basic commands work, +when there are no todos. +' +. ./test-lib.sh + +# +# ls|list +# +cat > expect < output && test_cmp expect output +' +test_expect_success 'null list' ' + todo.sh list > output && test_cmp expect output +' +test_expect_success 'null list filter' ' + todo.sh list filter > output && test_cmp expect output +' + +# +# lsp|listpri +# +# Re-use expect from ls. +test_expect_success 'null lsp' ' + todo.sh lsp > output && test_cmp expect output +' +test_expect_success 'null listpri' ' + todo.sh listpri > output && test_cmp expect output +' +test_expect_success 'null listpri a' ' + todo.sh listpri a > output && test_cmp expect output +' + +# +# lsa|listall +# +cat > expect < output && test_cmp expect output +' +test_expect_success 'null list' ' + todo.sh listall > output && test_cmp expect output +' +test_expect_success 'null list filter' ' + todo.sh listall filter > output && test_cmp expect output +' + + +# +# lsc|listcon +# +test_expect_success 'null lsc' ' + todo.sh lsc > output && ! test -s output +' +test_expect_success 'null listcon' ' + todo.sh listcon > output && ! test -s output +' + +# +# lsprj|listproj +# +test_expect_success 'null lsprj' ' + todo.sh lsprj > output && ! test -s output +' +test_expect_success 'null listproj' ' + todo.sh listproj > output && ! test -s output +' + +# +# lf|listfile +# +cat > expect < output || test_cmp expect output +' +test_expect_success 'null listfile' ' + todo.sh listfile > output || test_cmp expect output +' +cat > expect < output || test_cmp expect output +' + +test_done