Skip to content

Commit

Permalink
Fix #84
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Sep 29, 2019
1 parent a7d45f9 commit 273e024
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/test/java/wstxtest/sax/TestEntityResolver.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import org.xml.sax.*;
import org.xml.sax.helpers.DefaultHandler;

import com.ctc.wstx.exc.WstxException;
import com.ctc.wstx.sax.WstxSAXParserFactory;

import wstxtest.BaseWstxTest;
Expand Down Expand Up @@ -37,8 +38,14 @@ public void testWithDummyExtSubset()
*/
try {
sp.parse(new InputSource(new StringReader(XML)), h);
fail("Should not pass");
} catch (SAXException e) {
verifyException(e, "No such file or directory");
Throwable cause = e.getCause();
assertNotNull(cause);
assertTrue(cause instanceof WstxException);
// [woodstox-core#84]: actual message varies by OS so only verify this:
verifyException(e, " file ");
verifyException(e, "no-such-thing.dtd");
}

// And then with dummy resolver; should work ok now
Expand Down

0 comments on commit 273e024

Please sign in to comment.