From 5f80c8cd8de6ab532fbe3e267cca45b749331d98 Mon Sep 17 00:00:00 2001 From: mkersten Date: Fri, 20 Aug 2004 01:01:45 +0000 Subject: [PATCH] Fixed bug#71811 "AJDoc: should be able to set encoding like javadoc" --- ajdoc/src/org/aspectj/tools/ajdoc/Main.java | 15 ++++++++++++++ .../aspectj/tools/ajdoc/CoverageTestCase.java | 20 ++++++++++++++++++- 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/ajdoc/src/org/aspectj/tools/ajdoc/Main.java b/ajdoc/src/org/aspectj/tools/ajdoc/Main.java index 2cff8de2c..6611d2165 100644 --- a/ajdoc/src/org/aspectj/tools/ajdoc/Main.java +++ b/ajdoc/src/org/aspectj/tools/ajdoc/Main.java @@ -495,6 +495,21 @@ public class Main implements Config { options.addElement( arg ); ajcOptions.addElement( arg ); } + else if ( arg.equals( "-encoding" ) ) { + addNextAsOption = true; + addNextToAJCOptions = false; + options.addElement( arg ); + } + else if ( arg.equals( "-docencoding" ) ) { + addNextAsOption = true; + addNextToAJCOptions = false; + options.addElement( arg ); + } + else if ( arg.equals( "-charset" ) ) { + addNextAsOption = true; + addNextToAJCOptions = false; + options.addElement( arg ); + } else if ( arg.equals( "-sourcepath" ) ) { addNextAsSourcePath = true; //options.addElement( arg ); diff --git a/ajdoc/testsrc/org/aspectj/tools/ajdoc/CoverageTestCase.java b/ajdoc/testsrc/org/aspectj/tools/ajdoc/CoverageTestCase.java index a7dd01974..25182eaf7 100644 --- a/ajdoc/testsrc/org/aspectj/tools/ajdoc/CoverageTestCase.java +++ b/ajdoc/testsrc/org/aspectj/tools/ajdoc/CoverageTestCase.java @@ -36,6 +36,24 @@ public class CoverageTestCase extends TestCase { File outdir = new File("testdata/coverage/doc"); + public void testOptions() { + outdir.delete(); + String[] args = { + "-private", + "-encoding", + "EUCJIS", + "-docencoding", + "EUCJIS", + "-charset", + "UTF-8", + "-d", + outdir.getAbsolutePath(), + file0.getAbsolutePath(), + }; + org.aspectj.tools.ajdoc.Main.main(args); + assertTrue(true); + } + public void testCoverage() { outdir.delete(); String[] args = { @@ -59,7 +77,7 @@ public class CoverageTestCase extends TestCase { }; org.aspectj.tools.ajdoc.Main.main(args); } - + public void testCoveragePublicMode() { outdir.delete(); String[] args = { -- 2.39.5