File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
httpsnippet/src/test/java/io/github/atkawa7/httpsnippet/fixtures Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 1010import lombok .extern .slf4j .Slf4j ;
1111
1212import org .apache .commons .io .FileUtils ;
13+ import org .apache .commons .lang3 .StringUtils ;
1314import org .junit .jupiter .api .BeforeAll ;
1415import org .junit .jupiter .api .DisplayName ;
1516import org .junit .jupiter .params .ParameterizedTest ;
@@ -60,7 +61,7 @@ void testFixtures(Fixture fixture) throws Exception {
6061
6162 Client client = snippet .getClient ();
6263 Language language = snippet .getLanguage ();
63- String code = snippet .getCode ();
64+ String code = snippet .getCode (). replaceAll ( " \r \n " , " \n " ). trim () ;
6465 Path codeDir =
6566 Paths .get (
6667 fixtureBuilder .getOutput ().toString (),
@@ -71,7 +72,9 @@ void testFixtures(Fixture fixture) throws Exception {
7172 codeDir .toString (),
7273 String .format ("%s%s" , fixture .getFixtureType ().getName (), language .getExtname ()));
7374
74- assertEquals (FileUtils .readFileToString (codePath .toFile ()), code );
75+ String expected = FileUtils .readFileToString (codePath .toFile ()).replaceAll ("\r \n " , "\n " ).trim ();
76+
77+ assertEquals (expected , code );
7578 }
7679 }
7780}
You can’t perform that action at this time.
0 commit comments