[FIXED JENKINS-11073] handle failure to set timestamp on Windows platforms more gracefully - this time hopefully for real

This commit is contained in:
Christoph Kutzinski committed 2011-11-23 20:28:51 +01:00
1 parent 8656049fb9
commit 8755e59c9a
3 files changed
+24 -5

No files matched your search

@@ -23,6 +23,7 @@
*/
package hudson;
import hudson.remoting.LocalChannel;
import hudson.remoting.VirtualChannel;
import hudson.util.IOException2;
import hudson.util.NullStream;
@@ -296,5 +297,23 @@ public class FilePathTest extends ChannelTestCase {
Util.deleteRecursive(baseDir);
}
}
@Bug(11073)
public void testIsUnix() {
FilePath winPath = new FilePath(new LocalChannel(null),
" c:\\app\\hudson\\workspace\\3.8-jelly-db\\jdk/jdk1.6.0_21/label/sqlserver/profile/sqlserver\\acceptance-tests\\distribution.zip");
assertFalse(winPath.isUnix());
FilePath base = new FilePath(new LocalChannel(null),
"c:\\app\\hudson\\workspace\\3.8-jelly-db");
FilePath middle = new FilePath(base, "jdk/jdk1.6.0_21/label/sqlserver/profile/sqlserver");
FilePath full = new FilePath(middle, "acceptance-tests\\distribution.zip");
assertFalse(full.isUnix());
FilePath unixPath = new FilePath(new LocalChannel(null),
"/home/test");
assertTrue(unixPath.isUnix());
}
}