Permalink
Browse files

Add test for numbered deletion feature

  • Loading branch information...
1 parent 479032c commit da18d58c6964aae28a5d6e0001cf636c8fb9affc @seanirby seanirby committed Jan 5, 2013
Showing with 12 additions and 1 deletion.
  1. +12 −1 badoop-test.sh
View
@@ -34,11 +34,22 @@ it_prints_out_contents_of_todos_when_no_args_give() {
tear_down_test_file
}
-it_deletes_todos_matching_arguments() {
+it_deletes_todos_matching_word_arguments() {
set_up_test_file
echo "SOME STUFF" >> "$TODO"
$badoop -d SOME
res="$($badoop)"
test "$res" = ""
tear_down_test_file
}
+
+it_deletes_todo_matching_integer_argument(){
+ set_up_test_file
+ echo "FIRST TODO ENTRY" >> "$TODO"
+ echo "SECOND TODO ENTRY" >> "$TODO"
+ $badoop -d 2
+ $badoop -d 1
+ res="$($badoop)"
+ test "$res" = ""
+ tear_down_test_file
+}

0 comments on commit da18d58

Please sign in to comment.