diff --git a/test/integration/markdown.t/run.t b/test/integration/markdown.t/run.t
new file mode 100644
index 0000000000..62233845b3
--- /dev/null
+++ b/test/integration/markdown.t/run.t
@@ -0,0 +1,383 @@
+ $ ocamlc -c -bin-annot test.mli
+ $ odoc compile test.cmti
+ $ odoc link test.odoc
+ $ odoc markdown-generate test.odocl -o markdown
+ $ cat markdown/Test.md
+ Test
+
+ Module Test
+
+ # This is a heading
+
+ ## This has a label
+
+ ---
+
+ arrow (->) in a doc comment
+
+ ###### val concat : string -> string -> string
+
+ foo:bar : a raw markup
+
+ ###### type t
+
+ Doc for `type t`
+
+ ###### type a = t
+
+ ###### type y'
+
+ ###### module type Foo' = sig
+
+ ###### type foo
+
+ ###### end
+
+ ###### module Bar : sig ... end
+
+ ###### module type Bar' = sig
+
+ ###### type bar'
+
+ ###### end
+
+ ###### module type Foo = sig
+
+ ###### type foo
+
+ ###### type bar'
+
+ ###### module type Foo' = sig
+
+ ###### type foo'
+
+ ###### type days =
+
+ ###### | Mon
+
+ Docs for `days`
+
+ ###### type num = [
+
+ ###### | `One
+
+ Docs for `` `One``
+
+ ###### ]
+
+ ###### end
+
+ ###### end
+
+ ###### type other_names = {
+
+ ###### given : string ;
+
+ ###### nickname : string ;
+
+ ###### }
+
+ ###### type name = {
+
+ ###### fname : string ;
+
+ Docs for `fname`
+
+ ###### lname : string ;
+
+ ###### others : other_names ;
+
+ ###### }
+
+ ## Label
+
+ ---
+
+ [test_two](href)
+
+ [**test**](href)
+
+ [test two foo](href)
+
+ [**barz**](href)
+
+ ```
+ verbatim
+ text
+ ```
+
+ See if listness is preserved.
+
+ This is an _interface_ with **all** of the _module system_ features. This documentation demonstrates:
+
+ - comment formatting
+
+ - unassociated comments
+
+ - documentation sections
+
+ - module system documentation including
+
+ 1. submodules
+
+ 2. module aliases
+
+ 3. module types
+
+ 4. module type aliases
+
+ 5. modules with signatures
+
+ 6. modules with aliased signatures
+
+ A numbered list:
+
+ 1. 3
+
+ 2. 2
+
+ 3. 1
+
+ David Sheets is the author.
+
+ @author: David Sheets
+
+ ###### module Foo : sig ... end
+
+ The end foo end keyword in doc comment.
+
+ p1
+
+ p2
+
+ p3
+
+ - a
+
+ - b
+
+ This is where I begin my thing from.
+
+ 1. one
+
+ 2. two
+
+ - Mon
+
+ - Tue
+ $ odoc markdown-generate test.odocl -o markdown --generate-links
+ $ cat markdown/Test.md
+ Test
+
+ Module Test
+
+ # This is a heading
+
+ ## This has a label
+
+ ---
+
+ arrow (->) in a doc comment
+
+
+
+ ###### val concat : string -> string -> string
+
+ foo:bar : a raw markup
+
+
+
+ ###### type t
+
+ Doc for `type t`
+
+
+
+ ###### type a = [t](#type-t)
+
+
+
+ ###### type y'
+
+
+
+ ###### module type Foo' = sig
+
+
+
+ ###### type foo
+
+ ###### end
+
+
+
+ ###### module Bar : sig ... end
+
+
+
+ ###### module type Bar' = sig
+
+
+
+ ###### type bar'
+
+ ###### end
+
+
+
+ ###### module type Foo = sig
+
+
+
+ ###### type foo
+
+
+
+ ###### type bar'
+
+
+
+ ###### module type Foo' = sig
+
+
+
+ ###### type foo'
+
+
+
+ ###### type days =
+
+
+
+ ###### | Mon
+
+ Docs for `days`
+
+
+
+ ###### type num = [
+
+
+
+ ###### | `One
+
+ Docs for `` `One``
+
+ ###### ]
+
+ ###### end
+
+ ###### end
+
+
+
+ ###### type other_names = {
+
+
+
+ ###### given : string ;
+
+
+
+ ###### nickname : string ;
+
+ ###### }
+
+
+
+ ###### type name = {
+
+
+
+ ###### fname : string ;
+
+ Docs for `fname`
+
+
+
+ ###### lname : string ;
+
+
+
+ ###### others : [other_names](#type-other_names) ;
+
+ ###### }
+
+ ## Label
+
+ ---
+
+ [test_two](href)
+
+ [**test**](href)
+
+ [test two foo](href)
+
+ [**barz**](href)
+
+ ```
+ verbatim
+ text
+ ```
+
+ See if listness is preserved.
+
+ This is an _interface_ with **all** of the _module system_ features. This documentation demonstrates:
+
+ - comment formatting
+
+ - unassociated comments
+
+ - documentation sections
+
+ - module system documentation including
+
+ 1. submodules
+
+ 2. module aliases
+
+ 3. module types
+
+ 4. module type aliases
+
+ 5. modules with signatures
+
+ 6. modules with aliased signatures
+
+ A numbered list:
+
+ 1. 3
+
+ 2. 2
+
+ 3. 1
+
+ David Sheets is the author.
+
+ @author: David Sheets
+
+
+
+ ###### module Foo : sig ... end
+
+ The end foo end keyword in doc comment.
+
+ p1
+
+ p2
+
+ p3
+
+ - a
+
+ - b
+
+ This is where I begin my thing from.
+
+ 1. one
+
+ 2. two
+
+ - Mon
+
+ - Tue