Fix AsciidoctorWriterTests on Windows

Use String.format and %n so that the test's expectations are correct
on Windows and Unix-like platforms.

Fixes gh-29
This commit is contained in:
Yann Le Guern
2015-03-06 17:49:23 +01:00
committed by Andy Wilkinson
parent 7041c2b202
commit d6bd4870fd

View File

@@ -46,7 +46,7 @@ public class AsciidoctorWriterTests {
}
});
String expectedOutput = String.format("\n[source,java]\n----\nfoo\n----\n\n");
String expectedOutput = String.format("%n[source,java]%n----%nfoo%n----%n%n");
assertEquals(expectedOutput, this.output.toString());
}
@@ -60,7 +60,7 @@ public class AsciidoctorWriterTests {
}
});
String expectedOutput = String.format("\n[source,bash]\n----\n$ foo\n----\n\n");
String expectedOutput = String.format("%n[source,bash]%n----%n$ foo%n----%n%n");
assertEquals(expectedOutput, this.output.toString());
}
}