langtools/test/jdk/javadoc/tool/T4696488.java
changeset 40310 a979695d72a1
parent 35426 374342e56a56
child 45417 f7479ee8de69
equal deleted inserted replaced
40309:4c9d829b21ea 40310:a979695d72a1
     1 /*
     1 /*
     2  * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2012, 2016, 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.
    19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    20  * or visit www.oracle.com if you need additional information or have any
    20  * or visit www.oracle.com if you need additional information or have any
    21  * questions.
    21  * questions.
    22  */
    22  */
    23 
    23 
    24 import com.sun.tools.doclets.internal.toolkit.Configuration;
       
    25 
       
    26 /**
    24 /**
    27  * @test
    25  * @test
    28  * @bug     4696488
    26  * @bug     4696488
    29  * @summary javadoc doesn't handle UNC paths for destination directory
    27  * @summary javadoc doesn't handle UNC paths for destination directory
    30  * @author  Jesse Glick
    28  * @author  Jesse Glick
    31  * @modules jdk.javadoc/com.sun.tools.doclets.internal.toolkit
    29  * @modules jdk.javadoc/jdk.javadoc.internal.doclets.toolkit
    32  * @run main T4696488 T4696488.java
    30  * @run main T4696488 T4696488.java
    33  */
    31  */
       
    32 
       
    33 import jdk.javadoc.internal.doclets.toolkit.Configuration;
       
    34 
    34 public class T4696488 {
    35 public class T4696488 {
    35 
    36 
    36     public static void main(String... args) {
    37     public static void main(String... args) {
    37         System.setProperty("file.separator", "/");
    38         System.setProperty("file.separator", "/");
    38         assertAddTrailingFileSep("/path/to/dir", "/path/to/dir/");
    39         assertAddTrailingFileSep("/path/to/dir", "/path/to/dir/");
    51         String output = Configuration.addTrailingFileSep(input);
    52         String output = Configuration.addTrailingFileSep(input);
    52         if (!expectedOutput.equals(output)) {
    53         if (!expectedOutput.equals(output)) {
    53             throw new Error("expected " + expectedOutput + " but was " + output);
    54             throw new Error("expected " + expectedOutput + " but was " + output);
    54         }
    55         }
    55     }
    56     }
    56 
       
    57 }
    57 }