def test_backslash_dequote_string(self): self.assertEqual(backslash_dequote('\\ foo\\ bar\\#baz\\&'), ' foo bar#baz&')
def test_backslash_dequote_unknown_char(self): self.assertEqual(backslash_dequote('\\€'), '\\€') # NB: not dequoted
def test_backslash_dequote(self): self.assertEqual(backslash_dequote(''), '') self.assertEqual(backslash_dequote(' '), ' ') self.assertEqual(backslash_dequote('\\ '), ' ') self.assertEqual(backslash_dequote('a'), 'a') self.assertEqual(backslash_dequote('\\@'), '@')