Skip to content

Commit

Permalink
Add some failing test cases based on a report from @lmacken.
Browse files Browse the repository at this point in the history
  • Loading branch information
ralphbean committed Jan 22, 2014
1 parent eb2e96c commit 807eebd
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions taskw/test/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,22 @@ def test_with_escaped_quotes_full(self):
r = encode_task(decode_task(line))
eq_(r, r)

def test_with_backticks(self):
expected = {'this': r'has a fucking `backtick` in it'}
line = r'[this:"has a fucking `backtick` in it"]'
r = decode_task(line)
eq_(r, expected)
r = decode_task(encode_task(decode_task(line)))
eq_(r, expected)

def test_with_backslashes(self):
expected = {'andthis': r'has a fucking \backslash in it'}
line = r'[andthis:"has a fucking \\backslash in it"]'
r = decode_task(line)
eq_(r, expected)
r = decode_task(encode_task(decode_task(line)))
eq_(r, expected)

def test_decode(self):
r = decode_task(encode_task(TASK))
eq_(r, TASK)
Expand Down

0 comments on commit 807eebd

Please sign in to comment.