"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "core/src/test/java/hudson/FilePathTest.java" between
jenkins-jenkins-2.302.tar.gz and jenkins-jenkins-2.303.tar.gz

About: Jenkins is a automation server (written in Java) which can be used to automate all sorts of tasks related to building, testing, and delivering or deploying software (for e.g. as Continuous Integration and Continuous Delivery server). Weekly release.

FilePathTest.java  (jenkins-jenkins-2.302):FilePathTest.java  (jenkins-jenkins-2.303)
skipping to change at line 85 skipping to change at line 85
import java.util.zip.ZipOutputStream; import java.util.zip.ZipOutputStream;
import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull; import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertThrows; import static org.junit.Assert.assertThrows;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import static org.junit.Assume.assumeFalse; import static org.junit.Assume.assumeFalse;
import static org.junit.Assume.assumeTrue; import static org.junit.Assume.assumeTrue;
import static org.mockito.Mockito.mock; import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when; import static org.mockito.Mockito.when;
/** /**
* @author Kohsuke Kawaguchi * @author Kohsuke Kawaguchi
*/ */
public class FilePathTest { public class FilePathTest {
skipping to change at line 568 skipping to change at line 567
FilePath d2 = d.child("d1/d2"); FilePath d2 = d.child("d1/d2");
d2.mkdirs(); d2.mkdirs();
for (int i = 0; i < 100; i++) { for (int i = 0; i < 100; i++) {
FilePath d3 = d2.child("d" + i); FilePath d3 = d2.child("d" + i);
d3.mkdirs(); d3.mkdirs();
d3.child("f.txt").touch(0); d3.child("f.txt").touch(0);
} }
assertNull(d.validateAntFileMask("d1/d2/**/f.txt")); assertNull(d.validateAntFileMask("d1/d2/**/f.txt"));
assertNull(d.validateAntFileMask("d1/d2/**/f.txt", 10)); assertNull(d.validateAntFileMask("d1/d2/**/f.txt", 10));
assertEquals(Messages.FilePath_validateAntFileMask_portionMatchButPr eviousNotMatchAndSuggest("**/*.js", "**", "**/*.js"), d.validateAntFileMask("**/ *.js", 1000)); assertEquals(Messages.FilePath_validateAntFileMask_portionMatchButPr eviousNotMatchAndSuggest("**/*.js", "**", "**/*.js"), d.validateAntFileMask("**/ *.js", 1000));
try { assertThrows(InterruptedException.class, () -> d.validateAntFileMask
d.validateAntFileMask("**/*.js", 10); ("**/*.js", 10));
fail();
} catch (InterruptedException x) {
// good
}
} }
@Issue("JENKINS-5253") @Issue("JENKINS-5253")
@Test public void testValidateCaseSensitivity() throws Exception { @Test public void testValidateCaseSensitivity() throws Exception {
File tmp = Util.createTempDir(); File tmp = Util.createTempDir();
try { try {
FilePath d = new FilePath(channels.french, tmp.getPath()); FilePath d = new FilePath(channels.french, tmp.getPath());
d.child("d1/d2/d3").mkdirs(); d.child("d1/d2/d3").mkdirs();
d.child("d1/d2/d3/f.txt").touch(0); d.child("d1/d2/d3/f.txt").touch(0);
d.child("d1/d2/d3/f.html").touch(0); d.child("d1/d2/d3/f.html").touch(0);
 End of changes. 2 change blocks. 
7 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)