Skip to content

Commit

Permalink
fix failing tests for travis
Browse files Browse the repository at this point in the history
  • Loading branch information
rdmueller committed Nov 4, 2018
1 parent 26b4994 commit eb4ec8b
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 6 deletions.
6 changes: 2 additions & 4 deletions src/test/config_pdf.groovy
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@

outputPath = '../build/test/docs'

inputPath = 'docs'

inputFiles = [
[file: 'test.adoc', formats: ['html','revealjs','pdf','docbook']],
[file: 'test2.adoc', formats: ['html','revealjs','pdf','docbook']],
]

taskInputsDirs = [
"${inputPath}/",
]

taskInputsFiles = [
"${inputPath}/test.adoc"
"${inputPath}/test2.adoc"
]
88 changes: 88 additions & 0 deletions src/test/docs/test2.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
include::config-de.adoc[]

.sequence diagram (without graphviz)
[plantuml,"{plantUMLDir}testPlant",png]
----
a --> b
----

.component diagram (needs graphviz)
[plantuml,"{plantUMLDir}testPlant2",png]
----
[c]->[d]
----

.component diagram with jdot
[plantuml, "{plantUMLDir}demoPlantUML", png]
----
'!pragma graphviz_dot jdot
class BlockProcessor
class DiagramBlock
class DitaaBlock
class PlantUmlBlock
BlockProcessor <|-- DiagramBlock
DiagramBlock <|-- DitaaBlock
DiagramBlock <|-- PlantUmlBlock
----

image::ea/Use_Cases.png[width=25%]

include::ea/UseCases.ad[]

== a title

created jira:ARC-33[] for this.

[[section]] section

a test jira:DOC-50[] more

openIssues:test[]

<<DOC-50>>

.Open Issues
[options="header",cols="2,1,1,2,6"]
|====
|ID | Priority | Created | Assignee | Summary

include::../../build/docs/openissues.adoc[]

|====

NOTE: test

== a title
https://google.de[a link]
text

:source-highlighter: pygments

[source,ruby]
----
print 'hello' #<1>
print 'World' // <2>
----
<1> first callout
<2> second

== exportExcel

=== AsciiDoc

include::excel/Sample.xlsx/Numerisch.adoc[]

include::excel/Sample.xlsx/Werte.adoc[]

=== CSV

[options="header",format="csv"]
|===
include::excel/Sample.xlsx/Numerisch.csv[]
|===

[options="header",format="csv"]
|===
include::excel/Sample.xlsx/Werte.csv[]
|===
5 changes: 3 additions & 2 deletions src/test/groovy/docToolchain/GeneratePdfSpec.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,18 @@ class GeneratePdfSpec extends Specification {

void 'test correct handling of plantUML'() {
when: 'input file contains a plantuml diagram'
def file = new File('src/test/docs/test.adoc')
def file = new File('src/test/docs/test2.adoc')
println file.canonicalPath
def fileContent = file.text
then: ''
fileContent.contains('[plantuml,')
when: 'the gradle task is invoked'
def result = GradleRunner.create()
.withProjectDir(new File('.'))
.withArguments(['generatePDF','--info','-PmainConfigFile=config_pdf.groovy', '-PdocDir=./src/test/'])
.withArguments(['generatePDF','--info','-PmainConfigFile=config_pdf.groovy', '-PdocDir=./src/test/', '-PinputPath=docs'])
.build()
then: 'the task has been successfully executed'
println result.output
result.task(":generatePDF").outcome == SUCCESS
and: 'the output does not contain the warning "image to embed not found or not readable"'
println result.output
Expand Down

0 comments on commit eb4ec8b

Please sign in to comment.