Fixed Windows compatiblity bug in T0003_Basic.test027_UnpackedRefHigherPriorityThanPacked
PATCH 1/1 Fixed Windows compatiblity bug in T0003_Basic.test027_UnpackedRefHigherPriorityThanPacked
On Windows println outputs "\r\n" sequence, so test fails since '\r' is assumed to be a part of reference. This patch fixes test by printing '\n' explictly instead of using system line separtory through println.
Signed-off-by Constantine Plotnikov <[email protected]>
--- .../tst/org/spearce/jgit/lib/T0003_Basic.java | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
org.spearce.jgit.test/tst/org/spearce/jgit/lib/T0003_Basic.java +2 -1
@@ -507,7 +507,8 @@ assertEquals(ObjectId.fromString("00b1f73724f493096d1ffa0b0f1f1482dbb8c936"), public void test027_UnpackedRefHigherPriorityThanPacked() throws IOException { PrintWriter writer = new PrintWriter(new FileWriter(new File(db.getDirectory(), "refs/heads/a"))); String unpackedId = "7f822839a2fe9760f386cbbbcb3f92c5fe81def7"; - writer.println(unpackedId); + writer.print(unpackedId); + writer.print('\n'); writer.close(); ObjectId resolved = db.resolve("refs/heads/a");
Signature · 1 line
1.6.1.2