todotxt / todo.txt-cli

☑️ A simple and extensible shell script for managing your todo.txt file.
http://todotxt.org
GNU General Public License v3.0
5.56k stars 713 forks source link

Tests fail on ubuntu #317

Closed tzhao42 closed 3 years ago

tzhao42 commented 4 years ago

Do you want to request a feature or report a bug? Bug, make test fails right after installation.

What is the current behavior? Not all highlighting works as intended; dates and meta are not highlighted.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

make
make install
make test

output of make test:

rm -rf tests/test-results "tests/trash directory"*
cd tests && ./t2200-no-done-report-files.sh
*   ok 1: invoke todo.sh 1
*   ok 2: the todo file has been created
*   ok 3: no done file has been created
*   ok 4: no report file has been created
*   ok 5: perform archive 1
*   ok 6: no done file has been created by the archiving
*   ok 7: perform report 1
*   ok 8: no report file has been created by the reporting
* passed all 8 test(s)
cd tests && ./t6030-completion-tasks.sh
*   ok 1: simple task
*   ok 2: remove projects and contents from task
*   ok 3: keep priority
*   ok 4: keep priority and remove timestamp
*   ok 5: keep done marker and remove done date
*   ok 6: keep done marker and remove timestamp and done date
*   ok 7: remove add date
* passed all 7 test(s)
cd tests && ./t6060-completion-addon-files.sh
*   ok 1: nothing after unconfigured bar
*   ok 2: all files after configured bar
*   ok 3: nothing after configured bar ITEM#
*   ok 4: nothing after configured baz
*   ok 5: all files after configured baz ITEM#
*   ok 6: nothing after configured baz ITEM# MORE
*   ok 7: nothing after configured biz
*   ok 8: nothing after configured biz ITEM#
*   ok 9: all files after configured biz ITEM# MORE
*   ok 10: nothing after configured biz ITEM# EVEN MORE
* passed all 10 test(s)
cd tests && ./t1380-ls-date-number-metadata-highlighting.sh
* FAIL 1: highlighting for date, item numbers and metadata 1
todo.sh -d "$TEST_TODO_LABEL_COLORS" ls
--- expect      2020-08-29 18:50:46.108983893 +0000
+++ output      2020-08-29 18:50:46.128984157 +0000
@@ -1,5 +1,5 @@
-1 2018-11-11 task with date
-2 task with metadata due:2018-12-31
+1 2018-11-11 task with date
+2 task with metadata due:2018-12-31
 3 task without date and without metadata
--
TODO: 3 of 3 tasks shown
*   ok 2: suppressing highlighting for date, item numbers and metadata 1
* failed 1 among 2 test(s)
Makefile:96: recipe for target 'tests/t1380-ls-date-number-metadata-highlighting.sh' failed
make: *** [tests/t1380-ls-date-number-metadata-highlighting.sh] Error 1

Screenshot for colors: https://ibb.co/KWFd65K

What is the expected behavior? Date and meta highlighting; all tests passing

Which versions todo.sh are you using? v2.12.0

Which Operating System are you using? Ubuntu 18.04.5 LTS

Which version of bash are you using? GNU bash, version 4.4.20(1)-release (x86_64-pc-linux-gnu)

karbassi commented 3 years ago

Fixed in #322