Skip to content

Commit 93c0600

Browse files
committed
Improve readability of generated script
1 parent dd492ea commit 93c0600

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/matlab.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020-2023 The MathWorks, Inc.
1+
// Copyright 2020-2025 The MathWorks, Inc.
22

33
import { promises as fs } from "fs";
44
import * as os from "os";

src/script.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020-2023 The MathWorks, Inc.
1+
// Copyright 2020-2025 The MathWorks, Inc.
22

33
/**
44
* Generate MATLAB command for changing directories and calling a command in it.
@@ -8,7 +8,7 @@
88
* @returns MATLAB command.
99
*/
1010
export function cdAndCall(command: string): string {
11-
return `cd(getenv('MW_ORIG_WORKING_FOLDER'));${command}`;
11+
return `cd(getenv('MW_ORIG_WORKING_FOLDER')); ${command}`;
1212
}
1313

1414
/**

src/script.unit.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
// Copyright 2020-2023 The MathWorks, Inc.
1+
// Copyright 2020-2025 The MathWorks, Inc.
22

33
import * as script from "./script";
44

55
describe("call generation", () => {
66
it("ideally works", () => {
77
// I know what your thinking
88
const testCommand = "disp('hello world')";
9-
const expectedString = `cd(getenv('MW_ORIG_WORKING_FOLDER'));${testCommand}`;
9+
const expectedString = `cd(getenv('MW_ORIG_WORKING_FOLDER')); ${testCommand}`;
1010

1111
expect(script.cdAndCall(testCommand)).toMatch(expectedString);
1212
});

0 commit comments

Comments
 (0)