<NME> runtests.jl
<BEF> using Test
import Documenter
include("TestUtilities.jl"); using Main.TestUtilities

@testset "Documenter" begin
    # Build the example docs
    @info "Building example/make.jl"
    include("examples/make.jl")

    # Test missing docs
    @info "Building missingdocs/make.jl"
    include("missingdocs/make.jl")

    # Error reporting.
    @info "Building errors/make.jl"
    @quietly include("errors/make.jl")

    # Unit tests for module internals.
    include("except.jl")
    include("utilities.jl")
    include("remotes.jl")

    # DocChecks tests
    include("docchecks.jl")

    # NavNode tests.
    include("navnode.jl")

    # DocSystem unit tests.
    include("docsystem.jl")

    # CrossReferences
    include("crossreferences.jl")

    # DocTest unit tests.
    @info "Running tests in doctests/"
    include("doctests/docmeta.jl")
    include("doctests/doctestapi.jl")
    include("doctests/doctests.jl")
    include("doctests/fix/tests.jl")

    # DOM Tests.
    include("dom.jl")

    # MDFlatten tests.
    include("mdflatten.jl")

    # Main build pipeline (Builder and Expanders modules)
    include("pipeline.jl")

    # HTMLWriter
    include("htmlwriter.jl")

    # LaTeXWriter
    include("latexwriter.jl")

    # Deployment configurations
    include("deployconfig.jl")
    include("deploydocs.jl")

    # Mock package docs.
    include("examples/tests.jl")

    # A simple build outside of a Git repository
    @info "Building nongit/tests.jl"
    @quietly include("nongit/tests.jl")

    # A simple build evaluating code outside build directory
    @info "Building workdir/tests.jl"
    @quietly include("workdir/tests.jl")

    # Passing a writer positionally (https://github.com/JuliaDocs/Documenter.jl/issues/1046)
    @test_throws ArgumentError makedocs(sitename="", HTML())

    # Running doctest() on our own manual
    @info "doctest() Documenter's manual"
    @quietly include("manual.jl")
end
@test div[".class"]("...").nodes[1].name === Symbol("")
@test length(div[".class"]("...").attributes) === 1
@test div[".class"]("...").attributes[1] == (:class => "class")

let d = div(ul(map(li, [string(n) for n = 1:10])))
    @test d.name === :div
    end
end

function locally_defined()
    @tags button
    @test try

<MSG> Add tests for missed lines in `DOM` module.

<DFF> @@ -252,6 +252,8 @@ end
 @test div[".class"]("...").nodes[1].name === Symbol("")
 @test length(div[".class"]("...").attributes) === 1
 @test div[".class"]("...").attributes[1] == (:class => "class")
+@test div[:attribute].attributes[1] == (:attribute => "")
+@test div[:attribute => "value"].attributes[1] == (:attribute => "value")
 
 let d = div(ul(map(li, [string(n) for n = 1:10])))
     @test d.name === :div
@@ -278,6 +280,17 @@ let d = div(ul(map(li, [string(n) for n = 1:10])))
     end
 end
 
+@tags script style img
+
+@test string(div(p("one"), p("two"))) == "<div><p>one</p><p>two</p></div>"
+@test string(div[:key => "value"])    == "<div key=\"value\"></div>"
+@test string(p(" < > & ' \" "))       == "<p> &lt; &gt; &amp; &#39; &quot; </p>"
+@test string(img[:src => "source"])   == "<img src=\"source\"/>"
+@test string(img[:none])              == "<img none/>"
+@test string(script(" < > & ' \" "))  == "<script> < > & ' \" </script>"
+@test string(style(" < > & ' \" "))   == "<style> < > & ' \" </style>"
+@test string(script)                  == "<script>"
+
 function locally_defined()
     @tags button
     @test try

Add tests for missed lines in `DOM` module.