From 7ba97e6646261c0a15e2f46093141c3c7a164775 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Fri, 30 Aug 2024 00:52:53 +0200 Subject: [PATCH] include mawk tests --- tests-markdown.sh | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/tests-markdown.sh b/tests-markdown.sh index 0ffc3d3..f67cfbf 100755 --- a/tests-markdown.sh +++ b/tests-markdown.sh @@ -15,7 +15,7 @@ assert() { local md comp="$2" msg="$3" printf "%3i: %s ... " $acnt "$msg" - for proc in gawk bawk; do + for proc in gawk bawk mawk; do printf '%s ' $proc md="$(printf '%s' "$1" |md_"$proc")" if [ "$md" != "$comp" ]; then @@ -52,9 +52,9 @@ assert '`_foo_-> bar`' '

_foo_-> bar

' 'arrow' assert ' <- comment' '

<!-- comment --> ← comment

' 'arrow' # Escaping -assert "©" "

©

" "escape" -assert "\©" "

&copy;

" "escape" -assert "AT&T" "

AT&T

" "escape" +assert '©' "

©

" "escape" +assert '\©' "

&copy;

" "escape" +assert 'AT&T' "

AT&T

" "escape" assert '`©`' "

&copy;

" "code span escape" # Automatic Links @@ -131,6 +131,18 @@ not be but &shy; <escaped>' \ "indented code block" +assert ' indented code will + not be + + *formatted* + but ­ ' \ +'
indented code will
+not be
+
+*formatted*
+but &shy; <escaped>
' \ +"indented code block" + assert ':::: tag fenced _divs_ are regular text @@ -204,7 +216,7 @@ assert '#### Heading four' \ ' \ 'Heading arbitrary' -assert '### Heading three ######' \ +assert '###Heading three ######' \ '

Heading three

' \ 'Heading arbitrary' @@ -351,7 +363,7 @@ sub bar ### sub sub sub ### -## sub2 bar {x} +##sub2 bar {x} ' \ '

foo

bar

-- 2.39.2