From 0e2798accef06b6c796c7536fc5610cbf1aef5f9 Mon Sep 17 00:00:00 2001 From: Paul Mansfield Date: Wed, 24 Jun 2009 14:06:25 +0100 Subject: [PATCH] Added test for prepend and priority fix --- tests/t1400-prepend.sh | 55 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100755 tests/t1400-prepend.sh diff --git a/tests/t1400-prepend.sh b/tests/t1400-prepend.sh new file mode 100755 index 0000000..50610df --- /dev/null +++ b/tests/t1400-prepend.sh @@ -0,0 +1,55 @@ +#!/bin/sh + +test_description='basic prepend functionality +' +. ./test-lib.sh + +test_todo_session 'prepend usage' <>> todo.sh prepend B B +usage: todo.sh prepend ITEM# "TEXT TO PREPEND" +=== 1 +EOF + +cat > todo.txt <>> todo.sh list +1 (B) smell the uppercase Roses +flowers @outside +2 notice the sunflowers +3 stop +-- +TODO: 3 of 3 tasks shown from $HOME/todo.txt + +>>> todo.sh -p list +1 (B) smell the uppercase Roses +flowers @outside +2 notice the sunflowers +3 stop +-- +TODO: 3 of 3 tasks shown from $HOME/todo.txt + +>>> todo.sh prepend 2 test +2: test notice the sunflowers + +>>> todo.sh -p list +1 (B) smell the uppercase Roses +flowers @outside +3 stop +2 test notice the sunflowers +-- +TODO: 3 of 3 tasks shown from $HOME/todo.txt + +>>> todo.sh prepend 1 test +1: (B) test smell the uppercase Roses +flowers @outside + +>>> todo.sh -p list +1 (B) test smell the uppercase Roses +flowers @outside +3 stop +2 test notice the sunflowers +-- +TODO: 3 of 3 tasks shown from $HOME/todo.txt + +EOF + +test_done