Skip to content

Commit

Permalink
[JENKINS-18154] Add test for OUTPUT_DIRECTORY=.
Browse files Browse the repository at this point in the history
  • Loading branch information
kbriggs committed Jun 23, 2013
1 parent f9b10f4 commit 7943ee7
Show file tree
Hide file tree
Showing 2 changed files with 165 additions and 2 deletions.
42 changes: 40 additions & 2 deletions src/test/java/hudson/plugins/doxygen/DoxygenArchiverTest.java
Expand Up @@ -227,6 +227,44 @@ public void retrieveDoxygenFromLoadFileWithWhereRun() throws Exception {


classContext.assertIsSatisfied(); classContext.assertIsSatisfied();
context.assertIsSatisfied(); context.assertIsSatisfied();
} }



@Test
public void retrieveDoxygenFromLoadFileWithWhereRunDot() throws Exception {

String whereRun = "testWhereRun";

//Create the doxyfile with content in the temporary workspace
FilePath doxyfileDir = new FilePath(workspace,whereRun);
FilePath doxyfilePath = doxyfileDir.child("Doxyfile-dot");
doxyfileDir.mkdirs();
FileOutputStream fos = new FileOutputStream(new File(doxyfilePath.toURI()));
fos.write(readAsString("Doxyfile-dot").getBytes());
fos.close();

//Create the generated doxygen directory
String commandDoxygenGeneratedDirectoryName="html";
FilePath doxygenDir=new FilePath(doxyfileDir,commandDoxygenGeneratedDirectoryName);
doxygenDir.mkdirs();


DoxygenDirectoryParser doxygenDirectoryParser =
new DoxygenDirectoryParser(DoxygenArchiverDescriptor.DOXYGEN_DOXYFILE_PUBLISHTYPE ,doxyfilePath.toString(),"",whereRun);

classContext.checking(new Expectations() {
{
ignoring(taskListener).getLogger();
will(returnValue(new PrintStream(new ByteArrayOutputStream())));
}
});

FilePath resultDoxygenDirectory = doxygenDirectoryParser.invoke(parentFile, virtualChannel);
assertEquals("The computed doxygen directory is not correct", doxygenDir.toURI(),resultDoxygenDirectory.toURI());


classContext.assertIsSatisfied();
context.assertIsSatisfied();
}

} }
125 changes: 125 additions & 0 deletions src/test/resources/hudson/plugins/doxygen/Doxyfile-dot
@@ -0,0 +1,125 @@
# Doxyfile 1.5.7.1

#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = test
PROJECT_NUMBER = test
OUTPUT_DIRECTORY = .
CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ABBREVIATE_BRIEF = "The $name class" \
"The $name widget" \
"The $name file" \
is \
provides \
specifies \
contains \
represents \
a \
an \
the
ALWAYS_DETAILED_SEC = NO
INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = YES
STRIP_FROM_PATH = "C:/Documents and Settings/s0011918/"
STRIP_FROM_INC_PATH =
SHORT_NAMES = NO
JAVADOC_AUTOBRIEF = NO
QT_AUTOBRIEF = NO
MULTILINE_CPP_IS_BRIEF = NO
INHERIT_DOCS = YES
SEPARATE_MEMBER_PAGES = NO
TAB_SIZE = 8
ALIASES =
OPTIMIZE_OUTPUT_FOR_C = NO
OPTIMIZE_OUTPUT_JAVA = YES
OPTIMIZE_FOR_FORTRAN = NO
OPTIMIZE_OUTPUT_VHDL = NO
BUILTIN_STL_SUPPORT = NO
CPP_CLI_SUPPORT = NO
SIP_SUPPORT = NO
IDL_PROPERTY_SUPPORT = YES
DISTRIBUTE_GROUP_DOC = NO
SUBGROUPING = YES
TYPEDEF_HIDES_STRUCT = NO
SYMBOL_CACHE_SIZE = 0
INPUT = src/main/java
INPUT_ENCODING = UTF-8
FILE_PATTERNS = *.c \
*.cc \
*.cxx \
*.cpp \
*.c++ \
*.d \
*.java \
*.ii \
*.ixx \
*.ipp \
*.i++ \
*.inl \
*.h \
*.hh \
*.hxx \
*.hpp \
*.h++ \
*.idl \
*.odl \
*.cs \
*.php \
*.php3 \
*.inc \
*.m \
*.mm \
*.dox \
*.py \
*.f90 \
*.f \
*.vhd \
*.vhdl
RECURSIVE = YES
EXCLUDE =
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS =
EXCLUDE_SYMBOLS =
EXAMPLE_PATH =
EXAMPLE_PATTERNS = *
EXAMPLE_RECURSIVE = NO
IMAGE_PATH =
INPUT_FILTER =
FILTER_PATTERNS =
FILTER_SOURCE_FILES = NO
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
GENERATE_HTML = YES
HTML_OUTPUT = html
HTML_FILE_EXTENSION = .html
HTML_HEADER =
HTML_FOOTER =
HTML_STYLESHEET =
HTML_ALIGN_MEMBERS = YES
HTML_DYNAMIC_SECTIONS = NO
GENERATE_DOCSET = NO
DOCSET_FEEDNAME = "Doxygen generated docs"
DOCSET_BUNDLE_ID = org.doxygen.Project
GENERATE_HTMLHELP = NO
CHM_FILE =
HHC_LOCATION =
GENERATE_CHI = NO
CHM_INDEX_ENCODING =
BINARY_TOC = NO
TOC_EXPAND = NO
GENERATE_QHP = NO
QCH_FILE =
QHP_NAMESPACE = org.doxygen.Project
QHP_VIRTUAL_FOLDER = doc
QHG_LOCATION =
DISABLE_INDEX = NO
ENUM_VALUES_PER_LINE = 4
GENERATE_TREEVIEW = NONE
TREEVIEW_WIDTH = 250
FORMULA_FONTSIZE = 10

0 comments on commit 7943ee7

Please sign in to comment.