Exemplo n.º 1
0
 def test_unescape_of_quoted_newline(self):
     # regression test for #198
     self.assertEqual(r'\n', pofile.unescape(r'"\\n"'))
Exemplo n.º 2
0
 def test_unescape(self):
     escaped = u'"Say:\\n  \\"hello, world!\\"\\n"'
     unescaped = u'Say:\n  "hello, world!"\n'
     self.assertNotEqual(unescaped, escaped)
     self.assertEqual(unescaped, pofile.unescape(escaped))