Control: tag -1 + patch

Hi,

the tests are now failing because discount changed the output
format for anchor names in version 2.2.2, see [0] [1].
The attached patch adapts the test to this changed behavior,
so that it passes again.

Kind regards,
  Reiner

[0]: 
https://github.com/Orc/discount/commit/feb7505be16bd35d47b5f87fe294993ca414cb61
[1]: 
https://github.com/Orc/discount/commit/a953cffe3fb5ec128b6d446776ab13e8f373fcaa
diff --git a/debian/patches/fix_test_failure.patch b/debian/patches/fix_test_failure.patch
new file mode 100644
index 0000000..ebf0850
--- /dev/null
+++ b/debian/patches/fix_test_failure.patch
@@ -0,0 +1,17 @@
+Author: Reiner Herrmann <rei...@reiner-h.de>
+Description: Fix test failure with discount >= 2.2.2
+ Since version 2.2.2 discount generates anchor names with - instead of .
+ for spaces.
+Bug-Debian: https://bugs.debian.org/852901
+
+--- a/test_discount.lua
++++ b/test_discount.lua
+@@ -40,7 +40,7 @@
+ --end
+ 
+ function test_toc()
+-  local expected_out = '<a name="Level.1\"></a>\n<h1>Level 1</h1>\n\n<a name="Level.2\"></a>\n<h2>Level 2</h2>'
++  local expected_out = '<a name="Level-1\"></a>\n<h1>Level 1</h1>\n\n<a name="Level-2\"></a>\n<h2>Level 2</h2>'
+   local input = "# Level 1\n\n## Level 2\n\n"
+   luaunit.assertEquals(expected_out, discount(input, "toc"))
+ end
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..529c5c9
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+fix_test_failure.patch

Attachment: signature.asc
Description: PGP signature

Reply via email to