Some tests to reproduce the issue, will put together a pull request referencing the bug.

@Bug(18368)
    public void testDecoratedByEnvMaintainsIsUnix() throws Exception {
        ByteArrayOutputStream output = new ByteArrayOutputStream();
        TaskListener listener = new StreamBuildListener(output);
        Launcher remoteLauncher = new Launcher.RemoteLauncher(listener, Jenkins.MasterComputer.localChannel, false);
        Launcher decorated = remoteLauncher.decorateByEnv(new EnvVars());
        assertEquals(false, decorated.isUnix());
        remoteLauncher = new Launcher.RemoteLauncher(listener, Jenkins.MasterComputer.localChannel, true);
        decorated = remoteLauncher.decorateByEnv(new EnvVars());
        assertEquals(true, decorated.isUnix());
    }

    @Bug(18368)
    public void testDecoratedByPrefixMaintainsIsUnix() throws Exception {
        ByteArrayOutputStream output = new ByteArrayOutputStream();
        TaskListener listener = new StreamBuildListener(output);
        Launcher remoteLauncher = new Launcher.RemoteLauncher(listener, Jenkins.MasterComputer.localChannel, false);
        Launcher decorated = remoteLauncher.decorateByPrefix("test");
        assertEquals(false, decorated.isUnix());
        remoteLauncher = new Launcher.RemoteLauncher(listener, Jenkins.MasterComputer.localChannel, true);
        decorated = remoteLauncher.decorateByPrefix("test");
        assertEquals(true, decorated.isUnix());
    }
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply via email to