langtools/test/com/sun/javadoc/testNoPackagesFile/TestNoPackagesFile.java
changeset 23971 f5ff1f5a8dee
parent 5520 86e4b9a9da40
child 24065 fc4022e50129
equal deleted inserted replaced
23970:76f4acb11952 23971:f5ff1f5a8dee
     1 /*
     1 /*
     2  * Copyright (c) 2003, 2009, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    39     private static final String BUG_ID = "4475679";
    39     private static final String BUG_ID = "4475679";
    40 
    40 
    41     //Javadoc arguments.
    41     //Javadoc arguments.
    42     private static final String[] ARGS = new String[] {
    42     private static final String[] ARGS = new String[] {
    43         "-d", BUG_ID, "-sourcepath", SRC_DIR,
    43         "-d", BUG_ID, "-sourcepath", SRC_DIR,
    44         SRC_DIR + FS + "C.java"
    44         SRC_DIR + "/C.java"
    45     };
    45     };
    46 
    46 
    47     /**
    47     /**
    48      * The entry point of the test.
    48      * The entry point of the test.
    49      * @param args the array of command line arguments.
    49      * @param args the array of command line arguments.
    50      */
    50      */
    51     public static void main(String[] args) {
    51     public static void main(String[] args) {
    52         TestNoPackagesFile tester = new TestNoPackagesFile();
    52         TestNoPackagesFile tester = new TestNoPackagesFile();
    53         run(tester, ARGS, NO_TEST, NO_TEST);
    53         run(tester, ARGS, NO_TEST, NO_TEST);
    54         if ((new java.io.File(BUG_ID + FS + "packages.html")).exists()) {
    54         if ((new java.io.File(BUG_ID + "/packages.html")).exists()) {
    55             throw new Error("Test Fails: packages file should not be " +                "generated anymore.");
    55             throw new Error("Test Fails: packages file should not be " +                "generated anymore.");
    56         } else {
    56         } else {
    57             System.out.println("Test passes:  packages.html not found.");
    57             System.out.println("Test passes:  packages.html not found.");
    58         }
    58         }
    59     }
    59     }