Fix behavior of --todo with an optional argument
The previous behavior of --todo was to always only list uncompleted items, unless zero was specified as additional argument. Restore and document this behavior. Also, fix two tests that failed because the --todo output is now sorted. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
This commit is contained in:
@@ -8,8 +8,8 @@ if [ "$1" = 'actual' ]; then
|
||||
elif [ "$1" = 'expected' ]; then
|
||||
cat <<EOD
|
||||
to do:
|
||||
9. Gloriously slams
|
||||
9. Beefburger's
|
||||
9. Gloriously slams
|
||||
9. Seasons
|
||||
|
||||
02/23/13:
|
||||
|
||||
@@ -6,7 +6,7 @@ if [ "$1" = 'actual' ]; then
|
||||
"$CALCURSE" --read-only -D "$DATA_DIR"/ -t3
|
||||
elif [ "$1" = 'expected' ]; then
|
||||
echo 'to do:'
|
||||
sed -n 's/^\[3\] \(.*\)/3. \1/p' "$DATA_DIR"/todo
|
||||
sed -n 's/^\[3\] \(.*\)/3. \1/p' "$DATA_DIR"/todo | sort
|
||||
else
|
||||
./run-test "$0"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user