-
Notifications
You must be signed in to change notification settings - Fork 4
Add SelectByName parameter #148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
4bc8e86
9413f22
f444f1d
e4f4ac6
9425747
2ed76cc
116be18
e16adf7
9ec180e
2ae052a
37a6828
24c8e78
f32317e
4c322bf
35dae19
cc27322
608db0e
b859f7e
4a571d7
ebe8b20
f43cd5c
9f54ca6
bb81c48
7220fb2
5706504
d8491e4
16fd3e0
8068542
bdbfd26
0928d98
df19b45
77d9298
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,12 +14,22 @@ export interface IRunTestsOptions { | |
| HTMLModelCoverage?: string; | ||
| SelectByTag?: string; | ||
| SelectByFolder?: string; | ||
| SelectByName?: string; | ||
| Strict?: boolean; | ||
| UseParallel?: boolean; | ||
| OutputDetail?: string; | ||
| LoggingLevel?: string; | ||
| } | ||
|
|
||
| // Function to convert space separated names to cell array of character vectors | ||
| export function getSelectByNameAsCellArray(input?: string): string { | ||
| if (!input || !input.trim()) { | ||
| return "{}"; | ||
| } | ||
| const items = input.split(/\s+/).filter(Boolean).map((s) => `\'${s}\'`); | ||
| return `\{${items.join(", ")}\}`; | ||
| } | ||
|
|
||
| export function generateCommand(options: IRunTestsOptions): string { | ||
| return `addpath('${path.join(__dirname, "scriptgen")}');` + | ||
| `testScript = genscript('Test',` + | ||
|
|
@@ -34,6 +44,7 @@ export function generateCommand(options: IRunTestsOptions): string { | |
| `'HTMLModelCoverage','${options.HTMLModelCoverage || ""}',` + | ||
| `'SelectByTag','${options.SelectByTag || ""}',` + | ||
| `'SelectByFolder','${options.SelectByFolder || ""}',` + | ||
| `'SelectByName',${getSelectByNameAsCellArray(options.SelectByName)},` + | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a plan to go back and fix scriptgen so this can be:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, created an issue under scriptgen repo. |
||
| `'Strict',${options.Strict || false},` + | ||
| `'UseParallel',${options.UseParallel || false},` + | ||
| `'OutputDetail','${options.OutputDetail || ""}',` + | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hopefully this is just temporary until scriptgen gets updated to properly accept SelectByName as a space separated string?
While unlikely, single-quotes in the strings need to be escaped or it may result in a malformed cell array.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I created an issue in scritgen repo and added a note to update this once that issue is resolved.