summaryrefslogtreecommitdiff
path: root/test.py
diff options
context:
space:
mode:
Diffstat (limited to 'test.py')
-rw-r--r--test.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/test.py b/test.py
index b1d4ca9..0dc89aa 100644
--- a/test.py
+++ b/test.py
@@ -80,5 +80,22 @@ class TestSequenceFunctions(unittest.TestCase):
r = slugify(txt)
self.assertEqual(r, "this-is-a-test")
+ txt = 'Тестирование полных слов без замены'
+ r = slugify(txt, max_length=20, word_boundary=True, save_order=False)
+ self.assertEqual(r, "testirovanie-polnykh")
+
+ txt = 'Тестирование полных слов без замены'
+ r = slugify(txt, max_length=19, word_boundary=True, save_order=False)
+ self.assertEqual(r, "testirovanie-slov")
+
+ txt = 'Тестирование полных слов без замены'
+ r = slugify(txt, max_length=20, word_boundary=True, save_order=True)
+ self.assertEqual(r, "testirovanie-polnykh")
+
+ txt = 'Тестирование полных слов без замены'
+ r = slugify(txt, max_length=19, word_boundary=True, save_order=True)
+ self.assertEqual(r, "testirovanie")
+
+
if __name__ == '__main__':
unittest.main() \ No newline at end of file