From f4c045aa813a410d9047dfe784a6f45492c88b9e Mon Sep 17 00:00:00 2001 From: SavagePeanut Date: Wed, 28 Aug 2024 02:51:02 -0500 Subject: update matrix tests to use --- tests/test_matrix.py | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/tests/test_matrix.py b/tests/test_matrix.py index bea6a32..ffbd0a4 100644 --- a/tests/test_matrix.py +++ b/tests/test_matrix.py @@ -1,16 +1,5 @@ from slidge_style_parser import format_for_matrix -MATRIX_FORMATS = { - "_": ("", ""), - "*": ("", ""), - "~": ("", ""), - "`": ("", ""), - "```": ("
", "
"), - "```language": ("
", "
"), - ">": ("
", "
"), - "||": ("", ""), - "\n": ("
", "") -} def test_basic(): test = "_underline_" @@ -22,7 +11,7 @@ def test_basic(): assert(format_for_matrix(test) == formatted_body) test = "~strikethrough~" - formatted_body = "strikethrough" + formatted_body = "strikethrough" assert(format_for_matrix(test) == formatted_body) test = "`code span`" @@ -168,11 +157,11 @@ def test_nested(): assert(format_for_matrix(test) == formatted_body) test = "*_~`code span`~_*" - formatted_body = "code span" + formatted_body = "code span" assert(format_for_matrix(test) == formatted_body) test = ">*_~`code span`~_*" - formatted_body = "
code span
" + formatted_body = "
code span
" assert(format_for_matrix(test) == formatted_body) test = "*bold star >*< star bold*" @@ -246,11 +235,11 @@ def test_assorted(): assert(format_for_matrix(test) == formatted_body) test = "in the ~middle~ here" - formatted_body = "in the middle here" + formatted_body = "in the middle here" assert(format_for_matrix(test) == formatted_body) test = "_underline_ *bold* ~strikethrough~ >not quote ||spoiler||\n>quote\nnothing\nnothing\n>>>>another quote with ||~_*```four```*_~||" - formatted_body = "underline bold strikethrough >not quote spoiler
quote

nothing
nothing
another quote with ```four```
" + formatted_body = "underline bold strikethrough >not quote spoiler
quote

nothing
nothing
another quote with ```four```
" assert(format_for_matrix(test) == formatted_body) test = "```\nhacker\ncode\n```\n\n```\nhacker\ncode\n```" @@ -299,7 +288,7 @@ def test_weird_utf8(): assert(format_for_matrix(test) == formatted_body) test = "~\u200b~" - formatted_body = "\u200b" + formatted_body = "\u200b" assert(format_for_matrix(test) == formatted_body) test = "" -- cgit v1.2.3