14 lines
409 B
Python
14 lines
409 B
Python
import unittest
|
|
from bridge import protect, restore
|
|
|
|
|
|
class PlaceholderTests(unittest.TestCase):
|
|
def test_android_tokens_round_trip(self):
|
|
source = '确定删除这%1$d个文件吗?\\n<b>警告</b>'
|
|
protected, tokens = protect(source)
|
|
self.assertNotIn("%1$d", protected)
|
|
self.assertEqual(restore(protected, tokens), source)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|