Browse Source

CommitAndLogCommandTest: Use assumeFalse to skip test on Windows

Use JUnit's assumeFalse method to cause the test to skip when
run on Windows.

Change-Id: I3f59440cfe62c37c127e381052b60471fbe8ec5e
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
tags/v4.2.0.201601211800-r
David Pursehouse 8 years ago
parent
commit
ce1a3d7ef8

+ 2
- 2
org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CommitAndLogCommandTest.java View File

import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail; import static org.junit.Assert.fail;
import static org.junit.Assume.assumeFalse;


import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;


@Test @Test
public void testModeChange() throws IOException, GitAPIException { public void testModeChange() throws IOException, GitAPIException {
if (System.getProperty("os.name").startsWith("Windows"))
return; // SKIP
assumeFalse(System.getProperty("os.name").startsWith("Windows"));// SKIP
try (Git git = new Git(db)) { try (Git git = new Git(db)) {
// create file // create file
File file = new File(db.getWorkTree(), "a.txt"); File file = new File(db.getWorkTree(), "a.txt");

Loading…
Cancel
Save