aboutsummaryrefslogtreecommitdiff
path: root/modules/test/test-pipe-guard.js
diff options
context:
space:
mode:
Diffstat (limited to 'modules/test/test-pipe-guard.js')
-rw-r--r--modules/test/test-pipe-guard.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/modules/test/test-pipe-guard.js b/modules/test/test-pipe-guard.js
index 7851613..e689e60 100644
--- a/modules/test/test-pipe-guard.js
+++ b/modules/test/test-pipe-guard.js
@@ -43,10 +43,16 @@ const shellBody = si >= 0 ? shellSrc.slice(si, shellSrc.indexOf('_splitSequence(
const shellForwardsRaw = si >= 0
&& shellBody.indexOf('this.dispatchCommand(cmd, args, cmdText)') > 0
&& shellBody.indexOf('this.capturePipeOutput(cmd, args, cmdText)') > 0;
+// 5. v4.6.132: that override must tokenise with the quote-aware parser, not split(/\s+/), and must
+// skip empty stages instead of dispatching cmd ''.
+const shellTokensQuoted = si >= 0
+ && shellBody.indexOf('this.security._parseArgs(String(cmdText') > 0
+ && shellBody.indexOf('if (argv.length === 0) continue') > 0
+ && shellBody.indexOf('cmdText.split(') < 0;
-const report = { empty, blank, classifyGuarded, pipeGuarded, shellForwardsRaw };
+const report = { empty, blank, classifyGuarded, pipeGuarded, shellForwardsRaw, shellTokensQuoted };
console.log(JSON.stringify(report));
const ok = Array.isArray(empty) && empty.length === 0
&& Array.isArray(blank) && blank.length === 0
- && classifyGuarded && pipeGuarded && shellForwardsRaw;
+ && classifyGuarded && pipeGuarded && shellForwardsRaw && shellTokensQuoted;
process.exit(ok ? 0 : 1);