You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Chris Graham <ch...@gmail.com> on 2015/04/29 12:05:50 UTC

SCM: ClearCase tests failing on Windows

Hi All.

I'm getting these (this is one of three) failures when being built on
windows:

ClearCaseEditCommandTest.testCommand:41->ScmTestCase.assertCommandLine:367
expected:<...C "cleartool co -nc [C:\Documents and
Settings\admin\workspace\maven-scm\maven-scm-providers\maven-scm-provider-clearcase\test.java]">

 but was:<...C "cleartool co -nc ["C:\Documents and
Settings\admin\workspace\maven-scm\maven-scm-providers\maven-scm-provider-clearcase\test.java"]">


It is because this test routine:

public class ClearCaseEditCommandTest
    extends ScmTestCase
{
    public void testCommand()
        throws Exception
    {
        File file = new File( "test.java" );
        ScmFileSet scmFileSet = new ScmFileSet( getWorkingDirectory(), file
);
        Commandline commandLine = ClearCaseEditCommand.createCommandLine(
new DefaultLog(), scmFileSet );
        assertCommandLine( "cleartool co -nc " + file.getAbsolutePath(),
getWorkingDirectory(), commandLine );
    }
}


does not expect file.getAbsolutePath() to quote the path, whereas the
commandLine.toString() eventually calls:

getCommandLine() -> getRawCommandLine() -> StringUtils.quoteAndEscape()

The space in the path triggers the quoting in quoteAndEscape() , and so the
test fails.

Now that I understand the mechanics of this, am I the only one seeing this?

What has been done in the past to fix them? I've got enough on with the
jazz provider at the moment, I'd rather not add too it!

Suggestions as to how best to proceed would be greatly appreciated.

-Chris