Skip to content

Commit

Permalink
#1147: Fix for failing tests on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Michał Wadowski authored and sbernard31 committed Nov 10, 2021
1 parent 60b4010 commit d5bb0da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import static org.junit.Assert.assertEquals;

import java.nio.charset.StandardCharsets;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
Expand Down Expand Up @@ -120,7 +121,7 @@ public void allow_escaped_characters2c() throws LinkParseException {

@Test
public void dont_escape_non_ascii_chars() throws LinkParseException {
Link[] parsed = parser.parse("</foo>;param=\" \\ą \",</bar>".getBytes());
Link[] parsed = parser.parse("</foo>;param=\" \\ą \",</bar>".getBytes(StandardCharsets.UTF_8));
Assert.assertEquals("/foo", parsed[0].getUriReference());

Map<String, LinkParamValue> attResult = new HashMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import static org.junit.Assert.assertThrows;

import java.nio.charset.StandardCharsets;
import java.util.Arrays;
import java.util.Collection;

Expand Down Expand Up @@ -75,7 +76,7 @@ public void parse_invalid_formats() {
assertThrows(LinkParseException.class, new ThrowingRunnable() {
@Override
public void run() throws LinkParseException {
parser.parse(linkValueList.getBytes());
parser.parse(linkValueList.getBytes(StandardCharsets.UTF_8));
}
});
}
Expand Down

0 comments on commit d5bb0da

Please sign in to comment.