SourceOption.java revision 173:fdfed22db054
190792Sgshapiro/*
2261194Sgshapiro * Copyright 2006-2008 Sun Microsystems, Inc.  All Rights Reserved.
390792Sgshapiro * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
490792Sgshapiro *
590792Sgshapiro * This code is free software; you can redistribute it and/or modify it
690792Sgshapiro * under the terms of the GNU General Public License version 2 only, as
790792Sgshapiro * published by the Free Software Foundation.
890792Sgshapiro *
9266527Sgshapiro * This code is distributed in the hope that it will be useful, but WITHOUT
1090792Sgshapiro * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1190792Sgshapiro * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
1290792Sgshapiro * version 2 for more details (a copy is included in the LICENSE file that
1390792Sgshapiro * accompanied this code).
1490792Sgshapiro *
1590792Sgshapiro * You should have received a copy of the GNU General Public License version
1690792Sgshapiro * 2 along with this work; if not, write to the Free Software Foundation,
1790792Sgshapiro * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1890792Sgshapiro *
1990792Sgshapiro * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
2090792Sgshapiro * CA 95054 USA or visit www.sun.com if you need additional information or
2190792Sgshapiro * have any questions.
2290792Sgshapiro */
2390792Sgshapiro
2490792Sgshapiro/*
2590792Sgshapiro * @test
2690792Sgshapiro * @bug     6507179
2790792Sgshapiro * @summary Ensure that "-source" option isn't ignored.
2890792Sgshapiro * @author  Scott Seligman
2990792Sgshapiro */
3090792Sgshapiro
3190792Sgshapiroimport com.sun.javadoc.*;
3290792Sgshapiro
3390792Sgshapiropublic class SourceOption extends Doclet {
3490792Sgshapiro
3590792Sgshapiro    public static void main(String[] args) {
3690792Sgshapiro        if (com.sun.tools.javadoc.Main.execute(
3790792Sgshapiro                "javadoc",
3890792Sgshapiro                "SourceOption",
3990792Sgshapiro                SourceOption.class.getClassLoader(),
4090792Sgshapiro                new String[] {"-source", "1.3", "p"}) != 0)
4190792Sgshapiro            throw new Error("Javadoc encountered warnings or errors.");
4290792Sgshapiro    }
4390792Sgshapiro
4490792Sgshapiro    public static boolean start(RootDoc root) {
4590792Sgshapiro        root.classes();         // force parser into action
4690792Sgshapiro        return true;
4790792Sgshapiro    }
4890792Sgshapiro}
4990792Sgshapiro