diff options
Diffstat (limited to 'cli/tests')
| -rw-r--r-- | cli/tests/integration/task_tests.rs | 7 | ||||
| -rw-r--r-- | cli/tests/testdata/task/deno.json | 3 | ||||
| -rw-r--r-- | cli/tests/testdata/task/task_cwd.out | 1 | ||||
| -rw-r--r-- | cli/tests/testdata/task/task_no_args.out | 2 | ||||
| -rw-r--r-- | cli/tests/testdata/task/task_non_existent.out | 2 |
5 files changed, 14 insertions, 1 deletions
diff --git a/cli/tests/integration/task_tests.rs b/cli/tests/integration/task_tests.rs index e2adc85d9..837d9d2b7 100644 --- a/cli/tests/integration/task_tests.rs +++ b/cli/tests/integration/task_tests.rs @@ -12,6 +12,13 @@ itest!(task_no_args { exit_code: 1, }); +itest!(task_cwd { + args: "task -q --config task/deno.json --cwd .. echo_cwd", + output: "task/task_cwd.out", + envs: vec![("NO_COLOR".to_string(), "1".to_string())], + exit_code: 0, +}); + itest!(task_non_existent { args: "task --config task/deno.json non_existent", output: "task/task_non_existent.out", diff --git a/cli/tests/testdata/task/deno.json b/cli/tests/testdata/task/deno.json index 279c7ea8b..229315a4e 100644 --- a/cli/tests/testdata/task/deno.json +++ b/cli/tests/testdata/task/deno.json @@ -5,6 +5,7 @@ "deno_echo": "deno eval 'console.log(5)'", "strings": "deno run main.ts && deno eval \"console.log(\\\"test\\\")\"", "piped": "echo 12345 | (deno eval 'const b = new Uint8Array(1);Deno.stdin.readSync(b);console.log(b)' && deno eval 'const b = new Uint8Array(1);Deno.stdin.readSync(b);console.log(b)')", - "exit_code_5": "echo $(echo 10 ; exit 2) && exit 5" + "exit_code_5": "echo $(echo 10 ; exit 2) && exit 5", + "echo_cwd": "echo $(pwd)" } } diff --git a/cli/tests/testdata/task/task_cwd.out b/cli/tests/testdata/task/task_cwd.out new file mode 100644 index 000000000..bfe3e7b11 --- /dev/null +++ b/cli/tests/testdata/task/task_cwd.out @@ -0,0 +1 @@ +[WILDCARD]tests diff --git a/cli/tests/testdata/task/task_no_args.out b/cli/tests/testdata/task/task_no_args.out index e8c034a2d..d7e509656 100644 --- a/cli/tests/testdata/task/task_no_args.out +++ b/cli/tests/testdata/task/task_no_args.out @@ -5,6 +5,8 @@ Available tasks: deno eval 'console.log(5)' - echo echo 1 +- echo_cwd + echo $(pwd) - exit_code_5 echo $(echo 10 ; exit 2) && exit 5 - piped diff --git a/cli/tests/testdata/task/task_non_existent.out b/cli/tests/testdata/task/task_non_existent.out index bd4b73c6f..4867d3068 100644 --- a/cli/tests/testdata/task/task_non_existent.out +++ b/cli/tests/testdata/task/task_non_existent.out @@ -7,6 +7,8 @@ Available tasks: deno eval 'console.log(5)' - echo echo 1 +- echo_cwd + echo $(pwd) - exit_code_5 echo $(echo 10 ; exit 2) && exit 5 - piped |
