35 |
35 |
36 import java.io.*; |
36 import java.io.*; |
37 |
37 |
38 public class TestSourceTab extends JavadocTester { |
38 public class TestSourceTab extends JavadocTester { |
39 |
39 |
40 private static final String BUG_ID = "4510979"; |
|
41 private static final String TMP_SRC_DIR = "tmpSrc"; |
40 private static final String TMP_SRC_DIR = "tmpSrc"; |
42 private static final String OUTPUT_DIR1 = BUG_ID + "-tabLengthEight"; |
41 private static final String OUTPUT_DIR1 = OUTPUT_DIR + "-tabLengthEight"; |
43 private static final String OUTPUT_DIR2 = BUG_ID + "-tabLengthFour"; |
42 private static final String OUTPUT_DIR2 = OUTPUT_DIR + "-tabLengthFour"; |
44 |
43 |
45 //Run Javadoc on a source file with that is indented with a single tab per line |
44 //Run Javadoc on a source file with that is indented with a single tab per line |
46 private static final String[] ARGS1 = |
45 private static final String[] ARGS1 = |
47 new String[] { |
46 new String[] { |
48 "-d", OUTPUT_DIR1, "-sourcepath", TMP_SRC_DIR, |
47 "-d", OUTPUT_DIR1, "-sourcepath", TMP_SRC_DIR, |
57 "-d", OUTPUT_DIR2, "-sourcepath", TMP_SRC_DIR, |
56 "-d", OUTPUT_DIR2, "-sourcepath", TMP_SRC_DIR, |
58 "-notimestamp", "-sourcetab", "4", TMP_SRC_DIR + "/DoubleTab/C.java" |
57 "-notimestamp", "-sourcetab", "4", TMP_SRC_DIR + "/DoubleTab/C.java" |
59 }; |
58 }; |
60 |
59 |
61 //Files to diff |
60 //Files to diff |
62 private static final String[][] FILES_TO_DIFF = { |
61 private static final String[] FILES_TO_DIFF = { |
63 {OUTPUT_DIR1 + "/src-html/C.html", |
62 "src-html/C.html", |
64 OUTPUT_DIR2 + "/src-html/C.html" |
63 "C.html" |
65 }, |
|
66 {OUTPUT_DIR1 + "/C.html", |
|
67 OUTPUT_DIR2 + "/C.html" |
|
68 } |
|
69 |
|
70 }; |
64 }; |
71 |
65 |
72 /** |
66 /** |
73 * The entry point of the test. |
67 * The entry point of the test. |
74 * @param args the array of command line arguments. |
68 * @param args the array of command line arguments. |
75 */ |
69 */ |
76 public static void main(String[] args) throws IOException { |
70 public static void main(String[] args) throws IOException { |
77 TestSourceTab tester = new TestSourceTab(); |
71 TestSourceTab tester = new TestSourceTab(); |
78 tester.run(ARGS1, NO_TEST, NO_TEST); |
72 tester.run(ARGS1, NO_TEST, NO_TEST); |
79 tester.run(ARGS2, NO_TEST, NO_TEST); |
73 tester.run(ARGS2, NO_TEST, NO_TEST); |
80 tester.runDiffs(FILES_TO_DIFF); |
74 tester.runDiffs(OUTPUT_DIR1, OUTPUT_DIR2, FILES_TO_DIFF); |
81 } |
75 } |
82 |
76 |
83 TestSourceTab() throws IOException { |
77 TestSourceTab() throws IOException { |
84 initTabs(new File(SRC_DIR), new File(TMP_SRC_DIR)); |
78 initTabs(new File(SRC_DIR), new File(TMP_SRC_DIR)); |
85 } |
79 } |