2021-12-26 23:06:03 +08:00
|
|
|
|
# -------------------------------
|
|
|
|
|
# Difficult Rocket
|
|
|
|
|
# Copyright © 2021 by shenjackyuanjie
|
|
|
|
|
# All rights reserved
|
|
|
|
|
# -------------------------------
|
|
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
writen by shenjackyuanjie
|
|
|
|
|
mail: 3695888@qq.com
|
|
|
|
|
github: @shenjackyuanjie
|
|
|
|
|
gitee: @shenjackyuanjie
|
|
|
|
|
"""
|
|
|
|
|
|
2022-10-01 12:47:48 +08:00
|
|
|
|
import unittest
|
2021-12-26 23:06:03 +08:00
|
|
|
|
|
2023-07-13 23:04:20 +08:00
|
|
|
|
from Difficult_Rocket.client.guis.format import html
|
2021-12-26 23:06:03 +08:00
|
|
|
|
|
|
|
|
|
try_texts = [
|
2023-12-03 16:54:07 +08:00
|
|
|
|
"明天天气很好",
|
|
|
|
|
"从前有座山,山里有座庙, **is it**?",
|
|
|
|
|
"啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊。阿巴巴巴",
|
|
|
|
|
"阿瓦达达瓦的,aiwdhaihdwia.awdaiwhdahwido[12312](123131)",
|
|
|
|
|
"1231231dawdawd65ewwe56er56*awdadad*aaa**阿伟大的阿瓦打我的**",
|
|
|
|
|
"adwiuahiaa奥迪帮我auawuawdawdadw阿达达瓦aawd 2313",
|
|
|
|
|
"阿松大阿瓦达达娃啊aawadaawdawd阿瓦达达娃",
|
2021-12-26 23:06:03 +08:00
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
2022-10-01 12:47:48 +08:00
|
|
|
|
class HtmlFormatTest(unittest.TestCase):
|
|
|
|
|
def test1_format_texts(self):
|
2023-12-03 16:54:07 +08:00
|
|
|
|
self.assertEqual(
|
|
|
|
|
html.decode_text2HTML("明天天气很好"),
|
|
|
|
|
'<font face="" color=white>明天天气很好</font>',
|
|
|
|
|
)
|
2021-12-26 23:06:03 +08:00
|
|
|
|
|
2022-10-01 12:47:48 +08:00
|
|
|
|
|
2023-12-03 16:54:07 +08:00
|
|
|
|
if __name__ == "__main__":
|
2022-10-01 12:47:48 +08:00
|
|
|
|
unittest.main()
|