Skip to content

Commit

Permalink
fix command runner test
Browse files Browse the repository at this point in the history
  • Loading branch information
tsharmaMW committed Dec 26, 2024
1 parent 599ddb1 commit 232a534
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public void verifyScriptCreated() throws IOException, NoSuchMethodException, Ill
expectedCommand.add("setenv('MW_ORIG_WORKING_FOLDER', cd('"
+ currDir.getPath().replaceAll("'", ";;")
+ "'));" + "matlab_" + currDir.getName());

Method generateCommandArgs = getAccessibleMethod("generateCommandArgs", BuildRunnerContext.class, String.class);

Object actualCommand = generateCommandArgs.invoke(runner, context, command);
Expand All @@ -162,7 +162,7 @@ public void verifyScriptCreated() throws IOException, NoSuchMethodException, Ill
Assert.assertTrue(expectedFile.exists());

String contents = FileUtils.readFileToString(expectedFile);
Assert.assertEquals(contents, "cd(getenv('MW_ORIG_WORKING_FOLDER'));\n" + command);
Assert.assertEquals(contents, "cd(getenv('MW_ORIG_WORKING_FOLDER'));\naddpath('" + currDir.getPath() + "');\n" + command);
}

// startup options test
Expand Down

0 comments on commit 232a534

Please sign in to comment.