<NME> utilities.jl
<BEF> ADDFILE
<MSG> Move Utilities tests to a sep. file, use testsets

<DFF> @@ -0,0 +1,60 @@
+module UtilitiesTests
+
+if VERSION >= v"0.5.0-dev+7720"
+    using Base.Test
+else
+    using BaseTestNext
+    const Test = BaseTestNext
+end
+
+import Documenter
+
+module UnitTests
+    module SubModule end
+
+    # Does `submodules` collect *all* the submodules?
+    module A
+        module B
+            module C
+                module D end
+            end
+        end
+    end
+
+    type T end
+
+    "Documenter unit tests."
+    Base.length(::T) = 1
+end
+
+@testset "Utilities" begin
+    let doc = @doc(length)
+        a = Documenter.Utilities.filterdocs(doc, Set{Module}())
+        b = Documenter.Utilities.filterdocs(doc, Set{Module}([UnitTests]))
+        c = Documenter.Utilities.filterdocs(doc, Set{Module}([Base]))
+        d = Documenter.Utilities.filterdocs(doc, Set{Module}([UtilitiesTests]))
+
+        @test !isnull(a)
+        @test get(a) === doc
+        @test !isnull(b)
+        @test contains(stringmime("text/plain", get(b)), "Documenter unit tests.")
+        @test !isnull(c)
+        @test !contains(stringmime("text/plain", get(c)), "Documenter unit tests.")
+        @test isnull(d)
+    end
+
+    # Documenter.Utilities.issubmodule
+    @test Documenter.Utilities.issubmodule(Main, Main) === true
+    @test Documenter.Utilities.issubmodule(UnitTests, UnitTests) === true
+    @test Documenter.Utilities.issubmodule(UnitTests.SubModule, Main) === true
+    @test Documenter.Utilities.issubmodule(UnitTests.SubModule, UnitTests) === true
+    @test Documenter.Utilities.issubmodule(UnitTests.SubModule, Base) === false
+    @test Documenter.Utilities.issubmodule(UnitTests, UnitTests.SubModule) === false
+
+    @test UnitTests.A in Documenter.Utilities.submodules(UnitTests.A)
+    @test UnitTests.A.B in Documenter.Utilities.submodules(UnitTests.A)
+    @test UnitTests.A.B.C in Documenter.Utilities.submodules(UnitTests.A)
+    @test UnitTests.A.B.C.D in Documenter.Utilities.submodules(UnitTests.A)
+end
+
+end

Move Utilities tests to a sep. file, use testsets