diff --git a/tests.py b/tests.py index d602f3ad..f677ffcb 100644 --- a/tests.py +++ b/tests.py @@ -1557,19 +1557,28 @@ def testActorParsing(): def testWebLinks(): print('testWebLinks') + exampleText='This post has a web links https://somesite.net\n\nAnd some other text' linkedText=addWebLinks(exampleText) assert 'https://somesite.net1. HAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAH
' resultText=removeLongWords(exampleText,40,[]) assert resultText=='1. HAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHA
' + exampleText='ABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABC
' resultText=removeLongWords(exampleText,40,[]) assert resultText=='ABCABCABCABCABCABCABCABCABCABCABCABCABCA<\p>' + exampleText='
Some text.\n\nHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAH!
' + resultText=removeLongWords(exampleText,40,[]) + assert resultText=='Some text.\n\nHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAH
' + + def testAddEmoji(): print('testAddEmoji') content='Emoji :lemon: :strawberry: :banana:'