You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2015/01/28 21:37:03 UTC
svn commit: r1655461 -
/subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
Author: brane
Date: Wed Jan 28 20:37:03 2015
New Revision: 1655461
URL: http://svn.apache.org/r1655461
Log:
* subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
(BasicTests.testBlameWithDiffOptions): Fix test case; the original file
contents had no end-of-line, so the new must have none, too.
Modified:
subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
Modified: subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java?rev=1655461&r1=1655460&r2=1655461&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java (original)
+++ subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java Wed Jan 28 20:37:03 2015
@@ -3901,30 +3901,30 @@ public class BasicTests extends SVNTests
// Modify the file iota, making only whitespace changes.
File iota = new File(thisTest.getWorkingCopy(), "iota");
FileOutputStream stream = new FileOutputStream(iota, false);
- stream.write("This is the file 'iota'. \r\n".getBytes());
+ stream.write("This is the file 'iota'.\t".getBytes());
stream.close();
Set<String> srcPaths = new HashSet<String>(1);
srcPaths.add(thisTest.getWCPath());
- client.commit(srcPaths, Depth.infinity, false, false, null, null,
- new ConstMsg("Whitespace-only change in /iota"), null);
+ try {
+ client.username("rayjandom");
+ client.commit(srcPaths, Depth.infinity, false, false, null, null,
+ new ConstMsg("Whitespace-only change in /iota"), null);
+ } finally {
+ client.username("jrandom");
+ }
// Run blame on the result
BlameCallbackImpl callback = new BlameCallbackImpl();
client.blame(thisTest.getWCPath() + "/iota", Revision.HEAD,
Revision.getInstance(1), Revision.HEAD,
false, false, callback,
- new DiffOptions(DiffOptions.Flag.IgnoreWhitespace,
- DiffOptions.Flag.IgnoreEOLStyle));
+ new DiffOptions(DiffOptions.Flag.IgnoreWhitespace));
assertEquals(1, callback.numberOfLines());
BlameCallbackImpl.BlameLine line = callback.getBlameLine(0);
assertNotNull(line);
-
- // FIXME: JavaHL tests don't have XFAIL states.
- // FIXME: The commit was a whitespace-only change, so it
- // shouldn't be flagged as a change by blame.
- assertEquals(2, line.getRevision()); // FIXME: wrong? should it be 1?
+ assertEquals(1, line.getRevision());
assertEquals("jrandom", line.getAuthor());
- assertEquals("This is the file 'iota'. ", line.getLine());
+ assertEquals("This is the file 'iota'.\t", line.getLine());
}
/**