Skip to content

Commit f6fae7a

Browse files
committed
Added test cases for cmd, which and asyncExec
1 parent e5d2961 commit f6fae7a

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

javascript/ql/test/library-tests/frameworks/Shelljs/ShellJS.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ test_FileSystemAccess
5656
| tst.js:60:1:60:41 | shelljs ... cement) |
5757
| tst.js:61:1:61:17 | shelljs.cat(file) |
5858
test_MissingFileSystemAccess
59+
| tst.js:65:15:65:18 | file |
5960
test_SystemCommandExecution
6061
| tst.js:14:1:14:27 | shelljs ... ts, cb) |
6162
| tst.js:60:1:60:51 | shelljs ... ec(cmd) |

javascript/ql/test/library-tests/frameworks/Shelljs/tst.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,10 @@ shelljs.uniq(opts, file1, file2);
5959

6060
shelljs.cat(file).sed(regex, replacement).exec(cmd);
6161
shelljs.cat(file).exec(cmd);
62+
63+
shelljs.cmd(cmd, arg1, arg2, options);
64+
shelljs.cmd(cmd);
65+
shelljs.which(file);
66+
67+
const shelljssync = require("async-shelljs");
68+
shelljssync.asyncExec(cmd, opts, cb);

0 commit comments

Comments
 (0)