use of org.jabref.logic.layout.format.FileLinkPreferences in project jabref by JabRef.
the class LayoutTest method testWrapFileLinksLayout.
@Test
public // Test for http://discourse.jabref.org/t/the-wrapfilelinks-formatter/172 (the example in the help files)
void testWrapFileLinksLayout() throws IOException {
when(layoutFormatterPreferences.getFileLinkPreferences()).thenReturn(new FileLinkPreferences(Collections.emptyList(), Collections.singletonList("src/test/resources/pdfs/")));
String layoutText = layout("\\begin{file}\\format[WrapFileLinks(\\i. \\d (\\p))]{\\file}\\end{file}", "@other{bla, file={Test file:encrypted.pdf:PDF}}");
Assert.assertEquals("1. Test file (" + new File("src/test/resources/pdfs/encrypted.pdf").getCanonicalPath() + ")", layoutText);
}
Aggregations