Skip to content

Commit

Permalink
Merge pull request #676 from robertpanzer/remove-verbose
Browse files Browse the repository at this point in the history
Remove setting verbose mode to prevent logging of JRuby warnings
  • Loading branch information
robertpanzer committed Sep 21, 2018
2 parents 6d1911e + 6550835 commit c68d6e9
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Set the global variable VERBOSE to true to get invalid refs into the log
$VERBOSE=true
#$VERBOSE=true

module AsciidoctorJ
include_package 'org.asciidoctor'
Expand Down
46 changes: 46 additions & 0 deletions asciidoctorj-core/src/test/java/org/asciidoctor/QandATest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package org.asciidoctor;

//import org.asciidoctor.ast.DescriptionList;
import org.asciidoctor.ast.Document;
//import org.asciidoctor.ast.StructuralNode;
import org.junit.Test;

import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertThat;


public class QandATest {
/*
private static final String DOC = "== Test\n" +
"\n" +
".Q & A block\n"+
"[qanda]\n"+
"What is Asciidoctor?::\n"+
" An implementation of the AsciiDoc processor in Ruby.\n"+
"\n"+
"What is the answer to the Ultimate Question?:: 42";
@Test
public void shouldParseTitle() {
final Asciidoctor asciidoctor = Asciidoctor.Factory.create();
final Document doc = asciidoctor.load(DOC, OptionsBuilder.options().asMap());
final DescriptionList dl = findDescriptionList(doc);
assertThat(dl.getTitle(), is("Q & A block"));
assertThat(dl.getStyle(), is("qanda"));
}
private DescriptionList findDescriptionList(StructuralNode node) {
if (node instanceof DescriptionList) {
return (DescriptionList) node;
} else {
for (StructuralNode structuralNode : node.getBlocks()) {
DescriptionList dl = findDescriptionList(structuralNode);
if (dl != null) {
return dl;
}
}
return null;
}
}
*/
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import org.asciidoctor.util.ClasspathResources;
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
Expand Down Expand Up @@ -121,6 +122,7 @@ public void log(LogRecord logRecord) {
}

@Test
@Ignore("Until invalid refs are logged by default")
public void shouldLogInvalidRefs() throws Exception {

final List<LogRecord> logRecords = new ArrayList<>();
Expand Down

0 comments on commit c68d6e9

Please sign in to comment.