summaryrefslogtreecommitdiff
path: root/test.py
diff options
context:
space:
mode:
authorVal Neekman <val@neekware.com>2013-04-24 10:27:06 -0400
committerVal Neekman <val@neekware.com>2013-04-24 10:27:06 -0400
commite951142f77402cd4e0bdca69ea4aea5bb466c310 (patch)
tree26369e90d4a53ac5ff6807ef4833ff16a4a8e4a3 /test.py
parenta4c78fab0157d7da3ed77ca8b2f98cd0dbac5bf2 (diff)
downloadpython-slugify-e951142f77402cd4e0bdca69ea4aea5bb466c310.tar.gz
added non-dash separator option0.0.4
Diffstat (limited to 'test.py')
-rw-r--r--test.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/test.py b/test.py
index c279a33..13f5a85 100644
--- a/test.py
+++ b/test.py
@@ -55,6 +55,14 @@ class TestSequenceFunctions(unittest.TestCase):
r = slugify(txt, max_length=20, word_boundary=True)
self.assertEquals(r, "jaja-lol-mememeoo-a")
+ txt = 'jaja---lol-méméméoo--a'
+ r = slugify(txt, max_length=20, word_boundary=True, separator=".")
+ self.assertEquals(r, "jaja.lol.mememeoo.a")
+
+ txt = 'jaja---lol-méméméoo--a'
+ r = slugify(txt, max_length=20, word_boundary=True, separator="ZZZZZZ")
+ self.assertEquals(r, "jajaZZZZZZlolZZZZZZmememeooZZZZZZa")
+
if __name__ == '__main__':
unittest.main()