Skip to content

Commit

Permalink
test for resolving path elements asciidoctor#275
Browse files Browse the repository at this point in the history
  • Loading branch information
ahus1 committed Jul 12, 2019
1 parent caa53bb commit fdd2833
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/test/java/org/asciidoc/intellij/psi/AsciiDocPsiTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,15 @@ public void testImageBlockMacroWithTitle() {
assertEquals("Xyzzy", blockMacro.getTitle());
}

public void testImageBlockMacroWithReferences() {
PsiFile psiFile = configureByAsciiDoc("image::dir/foo.png[]");
PsiElement[] children = psiFile.getChildren();
assertEquals(1, children.length);
AsciiDocBlockMacro blockMacro = (AsciiDocBlockMacro) children[0];
assertEquals(2, blockMacro.getReferences().length);
assertEquals(2, blockMacro.getReferences()[0].getVariants().length);
}

public void testIncompleteBlockMacroWithAttributesInNewLine() {
PsiFile psiFile = configureByAsciiDoc("image::foo.png\n[hi]");
PsiElement[] children = psiFile.getChildren();
Expand Down

0 comments on commit fdd2833

Please sign in to comment.