Skip to content

Commit 335e09d

Browse files
committed
allow for spaces in single test names
1 parent df2cc79 commit 335e09d

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

build.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,7 @@ console.timeEnd('CHR');
127127

128128
const { spawnSync } = require('child_process');
129129

130-
function exec(cmd) {
131-
const [exe, ...args] = cmd.split(' ');
130+
function execArgs(exe, args) {
132131
const output = spawnSync(exe, args).output.flatMap(
133132
(d) => d?.toString() || [],
134133
);
@@ -138,6 +137,11 @@ function exec(cmd) {
138137
}
139138
}
140139

140+
function exec(cmd) {
141+
const [exe, ...args] = cmd.split(' ');
142+
execArgs(exe, args)
143+
}
144+
141145
const ca65bin = nativeCC65 ? 'ca65' : 'node ./tools/assemble/ca65.js';
142146
const flags = compileFlags.join(' ');
143147

@@ -208,5 +212,5 @@ if (args.includes('-t')) {
208212
if (args.includes('-T')) {
209213
const singleTest = args[1+args.indexOf('-T')];
210214
console.log(`\nrunning single test: ${singleTest}`);
211-
exec(`cargo run --release --manifest-path tests/Cargo.toml -- -T ${singleTest}`);
215+
execArgs('cargo', [...'run --release --manifest-path tests/Cargo.toml -- -T'.split(' '), singleTest]);
212216
}

0 commit comments

Comments
 (0)