diff --git a/doc/man/taskrc.5.in b/doc/man/taskrc.5.in index 38b72da09..8c48a029e 100644 --- a/doc/man/taskrc.5.in +++ b/doc/man/taskrc.5.in @@ -506,9 +506,10 @@ Level 1 shows hook calls. Level 2 also shows exit status and I/O. .TP .B debug.parser=0 -Controls the parser diagnostic level. Level 0 means no diagnostics. Level 1 -shows the parse tree. Level 2 shows expression evaluation details. Level 3 -shows parse trees from every phase of the parse. +Controls the parser diagnostic level. Level 0 shows no diagnostics. +Level 1 shows the final parse tree. +Level 2 shows the parse tree from all phases of the parse. +Level 3 shows expression evaluation details. .TP .B debug.tls=0 diff --git a/test/debug.t b/test/debug.t index 8d5c2030b..0a0927758 100755 --- a/test/debug.t +++ b/test/debug.t @@ -53,6 +53,18 @@ class TestDebugMode(TestCase): def test_debug_parser_output(self): """Verify debug parser mode generates interesting output""" + code, out, err = self.t("list rc.debug.parser=2") + + # Debug + self.assertIn("Config::load", err) + self.assertIn("Filtered 2 tasks --> 2 tasks [pending only]", err) + self.assertIn("Perf task", err) + + # Parser + self.assertIn("CLI2::prepareFilter", err) + + def test_debug_parser_eval_output(self): + """Verify debug parser + eval mode generates interesting output""" code, out, err = self.t("list rc.debug.parser=3") # Debug diff --git a/test/search.t b/test/search.t index 485eff5d0..932512601 100755 --- a/test/search.t +++ b/test/search.t @@ -79,7 +79,7 @@ class TestBug1472(TestCase): def test_startswith_regex(self): """Verify .startswith works with regexes""" - code, out, err = self.t("rc.regex:on rc.debug.parser=3 description.startswith:A ls") + code, out, err = self.t("rc.regex:on description.startswith:A ls") self.assertIn("A to Z", out) self.assertNotIn("Z to A", out) diff --git a/test/tw-295.t b/test/tw-295.t index c12df23dd..e24f75dc0 100755 --- a/test/tw-295.t +++ b/test/tw-295.t @@ -47,7 +47,7 @@ class TestBug295(TestCase): # Taskwarrior sees /\/twp\//TWO/. # # Verify using: - # code, out, err = self.t('rc.debug.parser=3 1 modify /\\\\/two\\\\//TWO/') + # code, out, err = self.t('rc.debug.parser=2 1 modify /\\\\/two\\\\//TWO/') # self.tap(err) self.t('1 modify /\\\\/two\\\\//TWO/') diff --git a/test/unicode.t b/test/unicode.t index 1f8a8804e..f5e9c09b5 100755 --- a/test/unicode.t +++ b/test/unicode.t @@ -90,7 +90,7 @@ class TestUnicode(TestCase): # Something in the launch code converts \\ --> \. # Taskwarrior sees \. # - #code, out, err = self.t("add rc.debug.parser=3 Price \\\\u20A43") + #code, out, err = self.t("add rc.debug.parser=2 Price \\\\u20A43") #self.tap(err) self.t("add Price \\\\u20A43")