tools test list command added simple tests for tree and json mode

We want at least test, that there is a minimal integrity with these
commands when running the arguments parsing tests.
This commit is contained in:
Jan Küster
2020-10-17 15:09:29 +02:00
parent 7bc487421f
commit b30207bbe0

View File

@@ -347,10 +347,25 @@ selftest.define("argument parsing", function () {
s.createApp('myapp', 'standard-app');
s.cd('myapp', function () {
run = s.run("list");
run.waitSecs(60);
run.waitSecs(20);
run.expectExit(0);
});
s.cd('myapp', function () {
run = s.run("list", "--tree");
run.waitSecs(20);
run.match("├─┬")
run.match("│ ├─┬")
run.expectExit(0);
})
s.cd('myapp', function () {
run = s.run("list", "--json");
run.waitSecs(20);
run.match(/[{}"a-zA-Z0-9,\s\n\r:_.()\[\]]+/)
run.expectExit(0);
})
s.createApp("app-with-extra-packages", "extra-packages-option", {
dontPrepareApp: true
});