]> git.scottworley.com Git - rfc1751/blob - rfc1751_test.py
Move word list to separate file
[rfc1751] / rfc1751_test.py
1 import unittest
2
3 from rfc1751 import rfc1751
4
5
6 class TestRFC1751(unittest.TestCase):
7 def testRFC1751(self) -> None:
8 self.assertEqual(rfc1751(0), ['A'])
9 self.assertEqual(rfc1751(1), ['ABE'])
10 self.assertEqual(rfc1751(2), ['ACE'])
11 self.assertEqual(rfc1751(2047), ['YOKE'])
12 self.assertEqual(rfc1751(2048), ['ABE', 'A'])
13 self.assertEqual(rfc1751(2049), ['ABE', 'ABE'])
14 self.assertEqual(rfc1751(2050), ['ABE', 'ACE'])
15
16 # Note: These can get NSFW
17 self.assertEqual(rfc1751(2112325), ['FIRM', 'COCK'])
18
19
20 if __name__ == '__main__':
21 unittest.main()