コード例 #1
0
ファイル: test_pofile.py プロジェクト: ghosthoughts/py3babel
 def test_unescape_of_quoted_newline(self):
     # regression test for #198
     self.assertEqual(r'\n', pofile.unescape(r'"\\n"'))
コード例 #2
0
ファイル: test_pofile.py プロジェクト: ghosthoughts/py3babel
 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))