From b30207bbe088ea25bd12deb5950ad20176d5631b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20K=C3=BCster?= Date: Sat, 17 Oct 2020 15:09:29 +0200 Subject: [PATCH] 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. --- tools/tests/command-line.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/tools/tests/command-line.js b/tools/tests/command-line.js index 94cc8a1a18..518015ac86 100644 --- a/tools/tests/command-line.js +++ b/tools/tests/command-line.js @@ -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 });