From 506cb4fc8acb49bfb34e655311bb4c4e05d04002 Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Sun, 4 Apr 2021 22:08:04 -0400 Subject: [PATCH] tests: Add regression test for TW #2429 --- test/tw-2429.t | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 test/tw-2429.t diff --git a/test/tw-2429.t b/test/tw-2429.t new file mode 100644 index 000000000..5abe3aa53 --- /dev/null +++ b/test/tw-2429.t @@ -0,0 +1,13 @@ +#!/usr/bin/env bash +. bash_tap_tw.sh + +# Setup the tasks, urgent ones and unimportant +for i in `seq 1 5`; do task add unimportant task $i; done +for i in `seq 1 5`; do task add important task $i due:today+${i}d; done + +# Complete all the tasks. Since the highest priority task was completed, +# nagging should not happen. +NAGGING_HAPPENS=`task rc.bulk:0 1-10 done 2>&1 | grep 'more urgent'` || : + +# Nagging should not have happened +[[ -z $NAGGING_HAPPENS ]]