提交 3d75a2b3 编写于 作者: K kohsuke

fixed a test failure in Mac --- apparently due to encoding handling in shell.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@23242 71c3de6d-444a-0410-be80-ed276b4c234a
上级 58b535c3
......@@ -25,8 +25,12 @@ package hudson.model;
import hudson.tasks.Shell;
import hudson.tasks.BatchFile;
import hudson.Launcher;
import org.jvnet.hudson.test.Email;
import org.jvnet.hudson.test.HudsonTestCase;
import org.jvnet.hudson.test.TestBuilder;
import java.io.IOException;
/**
* @author Kohsuke Kawaguchi
......@@ -75,11 +79,14 @@ public class DirectoryBrowserSupportTest extends HudsonTestCase {
}
public void testNonAsciiChar() throws Exception {
if(Hudson.isWindows()) return; // can't test this on Windows
// create a problematic file name in the workspace
FreeStyleProject p = createFreeStyleProject();
p.getBuildersList().add(new Shell("touch \u6F22\u5B57.bin")); // Kanji
p.getBuildersList().add(new TestBuilder() {
public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException {
build.getWorkspace().child("\u6F22\u5B57.bin").touch(0); // Kanji
return true;
}
}); // Kanji
p.scheduleBuild2(0).get();
// can we see it?
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册