8024096: some javadoc tests may contain false positive results

Reviewed-by: jjg
This commit is contained in:
Bhavesh Patel 2013-09-18 22:47:06 -07:00
parent 484e378a9d
commit 2be05076f8
6 changed files with 104 additions and 54 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -25,7 +25,7 @@ import java.io.File;
/*
* @test
* @bug 4258405 4973606
* @bug 4258405 4973606 8024096
* @summary This test verifies that the doc-file directory does not
* get overwritten when the sourcepath is equal to the destination
* directory.
@ -47,25 +47,17 @@ public class TestDocFileDir extends JavadocTester {
};
private static final String[][] NEGATED_TEST1 = NO_TEST;
private static final String[][] TEST2 = {
{BUG_ID + "-2" + FS + "pkg" + FS + "doc-files" + FS + "subdir-used1" +
private static final String[] FILE_TEST2 = {
BUG_ID + "-2" + FS + "pkg" + FS + "doc-files" + FS + "subdir-used1" +
FS + "testfile.txt",
"passed"
},
{BUG_ID + "-2" + FS + "pkg" + FS + "doc-files" + FS + "subdir-used2" +
FS + "testfile.txt",
"passed"
},
BUG_ID + "-2" + FS + "pkg" + FS + "doc-files" + FS + "subdir-used2" +
FS + "testfile.txt"
};
private static final String[][] NEGATED_TEST2 = {
{BUG_ID + "-2" + FS + "pkg" + FS + "doc-files" + FS + "subdir-excluded1" +
private static final String[] FILE_NEGATED_TEST2 = {
BUG_ID + "-2" + FS + "pkg" + FS + "doc-files" + FS + "subdir-excluded1" +
FS + "testfile.txt",
"passed"
},
{BUG_ID + "-2" + FS + "pkg" + FS + "doc-files" + FS + "subdir-excluded2" +
FS + "testfile.txt",
"passed"
},
BUG_ID + "-2" + FS + "pkg" + FS + "doc-files" + FS + "subdir-excluded2" +
FS + "testfile.txt"
};
private static final String[][] TEST0 = {
@ -106,7 +98,7 @@ public class TestDocFileDir extends JavadocTester {
run(tester, ARGS0, TEST0, NEGATED_TEST0);
copyDir(SRC_DIR + FS + "pkg", BUG_ID + "-1");
run(tester, ARGS1, TEST1, NEGATED_TEST1);
run(tester, ARGS2, TEST2, NEGATED_TEST2);
run(tester, ARGS2, NO_TEST, NO_TEST, FILE_TEST2, FILE_NEGATED_TEST2);
tester.printSummary();
}