1 /* |
1 /* |
2 * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2002, 2018, 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. |
25 * @test |
25 * @test |
26 * @bug 4661481 8024096 |
26 * @bug 4661481 8024096 |
27 * @summary This test determines if the value of the -encoding option is |
27 * @summary This test determines if the value of the -encoding option is |
28 * properly passed from Javadoc to the source file parser. |
28 * properly passed from Javadoc to the source file parser. |
29 * @author jamieh |
29 * @author jamieh |
30 * @library ../lib |
30 * @library ../../lib |
31 * @modules jdk.javadoc/jdk.javadoc.internal.tool |
31 * @modules jdk.javadoc/jdk.javadoc.internal.tool |
32 * @build JavadocTester |
32 * @build javadoc.tester.* |
33 * @run main TestEncoding |
33 * @run main TestEncoding |
34 */ |
34 */ |
|
35 |
|
36 import javadoc.tester.JavadocTester; |
35 |
37 |
36 public class TestEncoding extends JavadocTester { |
38 public class TestEncoding extends JavadocTester { |
37 |
39 |
38 public static void main(String... args) throws Exception { |
40 public static void main(String... args) throws Exception { |
39 TestEncoding tester = new TestEncoding(); |
41 TestEncoding tester = new TestEncoding(); |
40 tester.runTests(); |
42 tester.runTests(); |
41 } |
43 } |
42 |
44 |
43 @Test |
45 @Test |
44 void test() { |
46 public void test() { |
45 javadoc("-d", "out", |
47 javadoc("-d", "out", |
46 "-sourcepath", testSrc, |
48 "-sourcepath", testSrc, |
47 "-encoding", "iso-8859-1", |
49 "-encoding", "iso-8859-1", |
48 testSrc("EncodeTest.java")); |
50 testSrc("EncodeTest.java")); |
49 checkExit(Exit.OK); |
51 checkExit(Exit.OK); |