mirror of
https://github.com/tbabej/taskwiki.git
synced 2025-08-19 06:43:06 +02:00
tests: Test escaped sequences in modstrings
This commit is contained in:
parent
b5d4967399
commit
6fe90c664e
1 changed files with 11 additions and 0 deletions
|
@ -22,6 +22,17 @@ class TestParsingModstrings(object):
|
|||
assert util.tw_modstring_to_args("project:Random +test") == ["project:Random", "+test"]
|
||||
assert util.tw_modstring_to_args("project:Random due:now") == ["project:Random", "due:now"]
|
||||
|
||||
def test_modstring_to_args_with_quotes(self):
|
||||
assert util.tw_modstring_to_args('project:"Random test" +test') == ["project:Random test", "+test"]
|
||||
assert util.tw_modstring_to_args("project:'Random test' +test") == ["project:Random test", "+test"]
|
||||
|
||||
def test_modstring_to_args_with_esacpe(self):
|
||||
assert util.tw_modstring_to_args(r'project:Random\ test +test') == ["project:Random test", "+test"]
|
||||
assert util.tw_modstring_to_args(r"project:Random\ test +test") == ["project:Random test", "+test"]
|
||||
|
||||
def test_modstring_to_args_with_esacped_escape(self):
|
||||
assert util.tw_modstring_to_args(r'project:Random\\ +test') == ['project:Random\\', "+test"]
|
||||
|
||||
def test_modstring_to_args_overriding(self):
|
||||
assert util.tw_modstring_to_args("project:Random project:Home") == ["project:Random", "project:Home"]
|
||||
assert util.tw_modstring_to_args("project:Random due:now due:today") == ["project:Random", "due:now", "due:today"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue