Skip to content

Commit 56e2452

Browse files
committed
added trycatch to bibtex format test to show exception failure stack trace
1 parent ac86893 commit 56e2452

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

ReferenceLibrary/src/test/easyb/new_reference_created_with_non_english_characters_Story.groovy

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import referencelibrary.io.StubIO
33
import referencelibrary.ui.UI
44
import referencelibrary.ui.UI.*
55
import referencelibrary.data.StubDao
6-
import java.io.File;
6+
import java.io.*;
77
import java.nio.file.Files;
88

99
description 'A new reference with finnish characters can be added to referencelibrary'
@@ -59,7 +59,11 @@ scenario "Finnish characters in generated BibTeX file have been formatted", {
5959

6060
then 'BibTeX file has correctly formatted characters', {
6161
File f = new File("test_file.bib");
62-
Arrays.asList(Files.lines(f.toPath()).toArray()).shouldHave(' author = {\\"{a}uth\\"{o}r},')
62+
try {
63+
Arrays.asList(Files.lines(f.toPath()).toArray()).shouldHave(' author = {\\"{a}uth\\"{o}r},')
64+
} catch (IOException e) {
65+
fail e.getStackTrace.toString()
66+
}
6367
f.delete()
6468
}
6569
}

0 commit comments

Comments
 (0)