Docs: Updated man page regarding 'debug.parser' values

- Modified tests that use the above.
This commit is contained in:
Paul Beckingham 2015-09-07 12:33:53 -04:00
parent d210c6d07f
commit d87a753de1
5 changed files with 19 additions and 6 deletions

View file

@ -506,9 +506,10 @@ Level 1 shows hook calls. Level 2 also shows exit status and I/O.
.TP .TP
.B debug.parser=0 .B debug.parser=0
Controls the parser diagnostic level. Level 0 means no diagnostics. Level 1 Controls the parser diagnostic level. Level 0 shows no diagnostics.
shows the parse tree. Level 2 shows expression evaluation details. Level 3 Level 1 shows the final parse tree.
shows parse trees from every phase of the parse. Level 2 shows the parse tree from all phases of the parse.
Level 3 shows expression evaluation details.
.TP .TP
.B debug.tls=0 .B debug.tls=0

View file

@ -53,6 +53,18 @@ class TestDebugMode(TestCase):
def test_debug_parser_output(self): def test_debug_parser_output(self):
"""Verify debug parser mode generates interesting output""" """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") code, out, err = self.t("list rc.debug.parser=3")
# Debug # Debug

View file

@ -79,7 +79,7 @@ class TestBug1472(TestCase):
def test_startswith_regex(self): def test_startswith_regex(self):
"""Verify .startswith works with regexes""" """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.assertIn("A to Z", out)
self.assertNotIn("Z to A", out) self.assertNotIn("Z to A", out)

View file

@ -47,7 +47,7 @@ class TestBug295(TestCase):
# Taskwarrior sees /\/twp\//TWO/. # Taskwarrior sees /\/twp\//TWO/.
# #
# Verify using: # 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.tap(err)
self.t('1 modify /\\\\/two\\\\//TWO/') self.t('1 modify /\\\\/two\\\\//TWO/')

View file

@ -90,7 +90,7 @@ class TestUnicode(TestCase):
# Something in the launch code converts \\ --> \. # Something in the launch code converts \\ --> \.
# Taskwarrior sees \. # 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.tap(err)
self.t("add Price \\\\u20A43") self.t("add Price \\\\u20A43")