From e37050c3f400568c9a00bf2e84fc56ee93c93344 Mon Sep 17 00:00:00 2001 From: Michael Ochmann Date: Sun, 21 Aug 2022 12:18:38 +0200 Subject: [PATCH] added tests to check for annotations breaking things --- tests/AnnotationsTest.php | 70 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 tests/AnnotationsTest.php diff --git a/tests/AnnotationsTest.php b/tests/AnnotationsTest.php new file mode 100644 index 0000000..953b15b --- /dev/null +++ b/tests/AnnotationsTest.php @@ -0,0 +1,70 @@ +This is an H1 +

This is an H2

+

This is an H3

+

This is an H4

+
This is an H5
+ "; + + [$source, $result] = createTest($source, $target); + $this->assertEquals($source, $result); + } + + public function testAnnotationsDoNotBreakLists() : void { + $source = " + +* this is a list +* with annotations {#someID} + +1. this is an ordered list + 1. with an annotation {.someClass} + +"; + $target = " + +
    +
  1. + this is an ordered list +
      +
    1. with an annotation
    2. +
    +
  2. +
+ "; + + [$source, $result] = createTest($source, $target); + $this->assertEquals($source, $result); + } + + public function testAnnotationsDoNotBreakCodeblocks() : void { + $source = " +``` + this is a code block +``` {.someClass} +"; + $target = " +
+			this is a code block
+		
+ "; + + [$source, $result] = createTest($source, $target); + $this->assertEquals($source, $result); + } +} \ No newline at end of file