From fd3f517b69d637b07585aa90027561f8889d99fa Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Thu, 29 Aug 2024 14:34:02 +0200 Subject: [PATCH] additional tests --- tests-markdown.sh | 86 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) diff --git a/tests-markdown.sh b/tests-markdown.sh index a6bb361..01fbda1 100755 --- a/tests-markdown.sh +++ b/tests-markdown.sh @@ -47,6 +47,10 @@ assert '***strem***' '

strem

' "strong em" assert '***str**em*' '

strem

' "em strong" assert '_**strem**_' '

strem

' "em strong" +assert '_foo_-> bar' '

foo→ bar

' 'arrow' +assert '`_foo_-> bar`' '

_foo_-> bar

' 'arrow' +assert ' <- comment' '

<!-- comment --> ← comment

' 'arrow' + # Escaping assert "©" "

©

" "escape" assert "\©" "

&copy;

" "escape" @@ -273,4 +277,86 @@ Nesting paragraph ' \ "Nesting" +assert ' +| Col 1 | Col 2| Col 3 | +|-------|-------|------:| +| foo | *bar* | `qua` | +| 23 | 47 | 11 | +' \ +' + + + + +
Col 1 Col 2 Col 3
foo bar qua
23 47 11
' \ +'Pipe Tables' + +# assert ' +# Col 1 | Col 2| Col 3 +# :-----:|-------|------: +# foo | *bar* | `qua` +# 23 | 47 | 11 | +# ' \ +# ' +# +# +# +# +#
Col 1 Col 2 Col 3
foo bar qua
23 47 11
' \ +# 'Pipe Tables' + +assert '+---+---+---+ +|Col 1| Col 2 | Col 3| ++===+:==:+===+ +| * foo1 | *bar* |```| +| * foo2 | **qua** |code | +| - foo3 | `quux` |```| ++-------+-----+----+ +| 23 | 47 | 11 | ++-------+-----+----+ +' \ +' + + + + +

Col 1

+

Col 2

+

Col 3

+
    +
  • foo1
  • +
  • foo2
  • +
+
    +
  • foo3
  • +
+

bar + qua + quux

+
code 
+

23

+

47

+

11

+
' \ +'Grid Tables' + +assert '## foo + +# bar + +sub bar +------- + +### sub sub sub ### + +## sub2 bar {x} +' \ +'

foo

+

bar

+

sub bar

+

sub sub sub

+

sub2 bar

+
' \ +'Headline Nesting' + printf '\nAll test passed!\n' -- 2.39.2