32 */ 33 34 public class TestCopyFiles extends JavadocTester { 35 36 public static void main(String... args) throws Exception { 37 TestCopyFiles tester = new TestCopyFiles(); 38 tester.runTests(); 39 } 40 41 @Test 42 void testDocFilesInModulePackages() { 43 javadoc("-d", "modules-out", 44 "-top", "phi-TOP-phi", 45 "-bottom", "phi-BOTTOM-phi", 46 "-header", "phi-HEADER-phi", 47 "-footer", "phi-FOOTER-phi", 48 "-windowtitle", "phi-WINDOW-TITLE-phi", 49 "--module-source-path", testSrc("modules"), 50 "--module", "acme.mdle"); 51 checkExit(Exit.OK); 52 checkOrder("p/doc-files/inpackage.html", 53 "\"Hello World\" (phi-WINDOW-TITLE-phi)", 54 "phi-TOP-phi", 55 // check top navbar 56 "<a href=\"../../acme.mdle-summary.html\">Module</a>", 57 "<a href=\"../package-summary.html\">Package</a>", 58 "<a href=\"../../overview-tree.html\">Tree</a>", 59 "<a href=\"../../deprecated-list.html\">Deprecated</a>", 60 "<a href=\"../../index-all.html\">Index</a>", 61 "phi-HEADER-phi", 62 "In a named module acme.module and named package " 63 + "<a href=\"../package-summary.html\"><code>p</code></a>.", 64 "\"simpleTagLabel\">Since:</", 65 "1940", 66 // check bottom navbar 67 "<a href=\"../../acme.mdle-summary.html\">Module</a>", 68 "<a href=\"../package-summary.html\">Package</a>", 69 "<a href=\"../../overview-tree.html\">Tree</a>", 70 "<a href=\"../../deprecated-list.html\">Deprecated</a>", 71 "<a href=\"../../index-all.html\">Index</a>", 72 "phi-FOOTER-phi", 73 "phi-BOTTOM-phi" 74 ); 75 } 76 77 @Test 78 void testDocFilesInMultiModulePackagesWithRecursiveCopy() { 79 javadoc("-d", "multi-modules-out-recursive", 80 "-docfilessubdirs", 81 "-top", "phi-TOP-phi", 82 "-bottom", "phi-BOTTOM-phi", 83 "-header", "phi-HEADER-phi", 84 "-footer", "phi-FOOTER-phi", 85 "-windowtitle", "phi-WINDOW-TITLE-phi", 86 "--module-source-path", testSrc("modules"), 87 "--module", "acme.mdle,acme2.mdle"); 88 checkExit(Exit.OK); 89 checkOrder("p/doc-files/inpackage.html", 90 "\"Hello World\" (phi-WINDOW-TITLE-phi)", 91 "phi-TOP-phi", 92 // check top navbar 93 "<a href=\"../../acme.mdle-summary.html\">Module</a>", 94 "<a href=\"../package-summary.html\">Package</a>", 95 "<a href=\"../../overview-tree.html\">Tree</a>", 96 "<a href=\"../../deprecated-list.html\">Deprecated</a>", 97 "<a href=\"../../index-all.html\">Index</a>", 98 "phi-HEADER-phi", 99 "In a named module acme.module and named package " 100 + "<a href=\"../package-summary.html\"><code>p</code></a>.", 101 "\"simpleTagLabel\">Since:</", 102 "1940", 103 // check bottom navbar 104 "<a href=\"../../acme.mdle-summary.html\">Module</a>", 105 "<a href=\"../package-summary.html\">Package</a>", 106 "<a href=\"../../overview-tree.html\">Tree</a>", 107 "<a href=\"../../deprecated-list.html\">Deprecated</a>", 108 "<a href=\"../../index-all.html\">Index</a>", 109 "phi-FOOTER-phi", 110 "phi-BOTTOM-phi" 111 ); 112 113 // check the bottom most doc file 114 checkOrder("p2/doc-files/sub-dir/sub-dir-1/SubSubReadme.html", 115 "SubSubReadme (phi-WINDOW-TITLE-phi)", 116 "phi-TOP-phi", 117 // check top navbar 118 "<a href=\"../../../../acme2.mdle-summary.html\">Module</a>", 119 "<a href=\"../../../package-summary.html\">Package</a>", 120 "<a href=\"../../../../overview-tree.html\">Tree</a>", 121 "<a href=\"../../../../deprecated-list.html\">Deprecated</a>", 122 "<a href=\"../../../../index-all.html\">Index</a>", 123 "phi-HEADER-phi", 124 "SubSubReadme.html at third level of doc-file directory.", 125 // check bottom navbar 126 "<a href=\"../../../../acme2.mdle-summary.html\">Module</a>", 127 "<a href=\"../../../package-summary.html\">Package</a>", 128 "<a href=\"../../../../overview-tree.html\">Tree</a>", 129 "<a href=\"../../../../deprecated-list.html\">Deprecated</a>", 130 "<a href=\"../../../../index-all.html\">Index</a>", 131 "phi-FOOTER-phi", 132 "phi-BOTTOM-phi" 133 ); 134 } 135 @Test 136 void testDocFilesInModulePackagesWithRecursiveCopy() { 137 javadoc("-d", "modules-out-recursive", 138 "-docfilessubdirs", 139 "--module-source-path", testSrc("modules"), 140 "--module", "acme.mdle"); 141 checkExit(Exit.OK); 142 checkOutput("p/doc-files/inpackage.html", true, 143 "In a named module acme.module and named package " 144 + "<a href=\"../package-summary.html\"><code>p</code></a>." 145 ); 146 } 147 148 @Test 149 void testDocFilesInModulePackagesWithRecursiveCopyWithExclusion() { 150 javadoc("-d", "modules-out-recursive-with-exclusion", 151 "-docfilessubdirs", 152 "-excludedocfilessubdir", "sub-dir", 153 "--module-source-path", testSrc("modules"), 154 "--module", "acme.mdle"); 155 checkExit(Exit.OK); 156 checkOutput("p/doc-files/inpackage.html", true, 157 "In a named module acme.module and named package " 158 + "<a href=\"../package-summary.html\"><code>p</code></a>." 159 ); 160 } 161 162 @Test 163 void testDocFilesInPackages() { 164 javadoc("-d", "packages-out", 165 "-sourcepath", testSrc("packages"), 166 "p1"); 167 checkExit(Exit.OK); 168 checkOutput("p1/doc-files/inpackage.html", true, 169 "A named package in an unnamed module" 170 ); 171 } 172 173 @Test 174 void testDocFilesInPackagesWithRecursiveCopy() { 175 javadoc("-d", "packages-out-recursive", 176 "-docfilessubdirs", | 32 */ 33 34 public class TestCopyFiles extends JavadocTester { 35 36 public static void main(String... args) throws Exception { 37 TestCopyFiles tester = new TestCopyFiles(); 38 tester.runTests(); 39 } 40 41 @Test 42 void testDocFilesInModulePackages() { 43 javadoc("-d", "modules-out", 44 "-top", "phi-TOP-phi", 45 "-bottom", "phi-BOTTOM-phi", 46 "-header", "phi-HEADER-phi", 47 "-footer", "phi-FOOTER-phi", 48 "-windowtitle", "phi-WINDOW-TITLE-phi", 49 "--module-source-path", testSrc("modules"), 50 "--module", "acme.mdle"); 51 checkExit(Exit.OK); 52 checkOrder("acme.mdle/p/doc-files/inpackage.html", 53 "\"Hello World\" (phi-WINDOW-TITLE-phi)", 54 "phi-TOP-phi", 55 // check top navbar 56 "<a href=\"../../module-summary.html\">Module</a>", 57 "<a href=\"../package-summary.html\">Package</a>", 58 "<a href=\"../../../overview-tree.html\">Tree</a>", 59 "<a href=\"../../../deprecated-list.html\">Deprecated</a>", 60 "<a href=\"../../../index-all.html\">Index</a>", 61 "phi-HEADER-phi", 62 "In a named module acme.module and named package " 63 + "<a href=\"../package-summary.html\"><code>p</code></a>.", 64 "\"simpleTagLabel\">Since:</", 65 "1940", 66 // check bottom navbar 67 "<a href=\"../../module-summary.html\">Module</a>", 68 "<a href=\"../package-summary.html\">Package</a>", 69 "<a href=\"../../../overview-tree.html\">Tree</a>", 70 "<a href=\"../../../deprecated-list.html\">Deprecated</a>", 71 "<a href=\"../../../index-all.html\">Index</a>", 72 "phi-FOOTER-phi", 73 "phi-BOTTOM-phi" 74 ); 75 } 76 77 @Test 78 void testDocFilesInMultiModulePackagesWithRecursiveCopy() { 79 javadoc("-d", "multi-modules-out-recursive", 80 "-docfilessubdirs", 81 "-top", "phi-TOP-phi", 82 "-bottom", "phi-BOTTOM-phi", 83 "-header", "phi-HEADER-phi", 84 "-footer", "phi-FOOTER-phi", 85 "-windowtitle", "phi-WINDOW-TITLE-phi", 86 "--module-source-path", testSrc("modules"), 87 "--module", "acme.mdle,acme2.mdle"); 88 checkExit(Exit.OK); 89 checkOrder("acme.mdle/p/doc-files/inpackage.html", 90 "\"Hello World\" (phi-WINDOW-TITLE-phi)", 91 "phi-TOP-phi", 92 // check top navbar 93 "<a href=\"../../module-summary.html\">Module</a>", 94 "<a href=\"../package-summary.html\">Package</a>", 95 "<a href=\"../../../overview-tree.html\">Tree</a>", 96 "<a href=\"../../../deprecated-list.html\">Deprecated</a>", 97 "<a href=\"../../../index-all.html\">Index</a>", 98 "phi-HEADER-phi", 99 "In a named module acme.module and named package " 100 + "<a href=\"../package-summary.html\"><code>p</code></a>.", 101 "\"simpleTagLabel\">Since:</", 102 "1940", 103 // check bottom navbar 104 "<a href=\"../../module-summary.html\">Module</a>", 105 "<a href=\"../package-summary.html\">Package</a>", 106 "<a href=\"../../../overview-tree.html\">Tree</a>", 107 "<a href=\"../../../deprecated-list.html\">Deprecated</a>", 108 "<a href=\"../../../index-all.html\">Index</a>", 109 "phi-FOOTER-phi", 110 "phi-BOTTOM-phi" 111 ); 112 113 // check the bottom most doc file 114 checkOrder("acme2.mdle/p2/doc-files/sub-dir/sub-dir-1/SubSubReadme.html", 115 "SubSubReadme (phi-WINDOW-TITLE-phi)", 116 "phi-TOP-phi", 117 // check top navbar 118 "<a href=\"../../../../module-summary.html\">Module</a>", 119 "<a href=\"../../../package-summary.html\">Package</a>", 120 "<a href=\"../../../../../overview-tree.html\">Tree</a>", 121 "<a href=\"../../../../../deprecated-list.html\">Deprecated</a>", 122 "<a href=\"../../../../../index-all.html\">Index</a>", 123 "phi-HEADER-phi", 124 "SubSubReadme.html at third level of doc-file directory.", 125 // check bottom navbar 126 "<a href=\"../../../../module-summary.html\">Module</a>", 127 "<a href=\"../../../package-summary.html\">Package</a>", 128 "<a href=\"../../../../../overview-tree.html\">Tree</a>", 129 "<a href=\"../../../../../deprecated-list.html\">Deprecated</a>", 130 "<a href=\"../../../../../index-all.html\">Index</a>", 131 "phi-FOOTER-phi", 132 "phi-BOTTOM-phi" 133 ); 134 } 135 136 @Test 137 void testDocFilesInModulePackagesWithRecursiveCopy() { 138 javadoc("-d", "modules-out-recursive", 139 "-docfilessubdirs", 140 "--module-source-path", testSrc("modules"), 141 "--module", "acme.mdle"); 142 checkExit(Exit.OK); 143 checkOutput("acme.mdle/p/doc-files/inpackage.html", true, 144 "In a named module acme.module and named package " 145 + "<a href=\"../package-summary.html\"><code>p</code></a>." 146 ); 147 } 148 149 @Test 150 void testDocFilesInModulePackagesWithRecursiveCopyWithExclusion() { 151 javadoc("-d", "modules-out-recursive-with-exclusion", 152 "-docfilessubdirs", 153 "-excludedocfilessubdir", "sub-dir", 154 "--module-source-path", testSrc("modules"), 155 "--module", "acme.mdle"); 156 checkExit(Exit.OK); 157 checkOutput("acme.mdle/p/doc-files/inpackage.html", true, 158 "In a named module acme.module and named package " 159 + "<a href=\"../package-summary.html\"><code>p</code></a>." 160 ); 161 } 162 163 @Test 164 void testDocFilesInPackages() { 165 javadoc("-d", "packages-out", 166 "-sourcepath", testSrc("packages"), 167 "p1"); 168 checkExit(Exit.OK); 169 checkOutput("p1/doc-files/inpackage.html", true, 170 "A named package in an unnamed module" 171 ); 172 } 173 174 @Test 175 void testDocFilesInPackagesWithRecursiveCopy() { 176 javadoc("-d", "packages-out-recursive", 177 "-docfilessubdirs", |