mirror of
https://github.com/go-task/task.git
synced 2026-06-11 09:51:50 +00:00
refactor: unify how executor tests are written (#2042)
* feat: use TaskTest for executor tests * feat: more tests * feat: separate tests for executing and formatting with new functional options that work for both test types * feat: formatter tests * refactor: more tests
This commit is contained in:
1
testdata/alias/testdata/TestAlias-duplicate_alias-err-run.golden
vendored
Normal file
1
testdata/alias/testdata/TestAlias-duplicate_alias-err-run.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
task: Found multiple tasks (foo, bar) that match "x"
|
||||
0
testdata/alias/testdata/TestAlias-duplicate_alias.golden
vendored
Normal file
0
testdata/alias/testdata/TestAlias-duplicate_alias.golden
vendored
Normal file
12
testdata/concurrency/testdata/TestConcurrency.golden
vendored
Normal file
12
testdata/concurrency/testdata/TestConcurrency.golden
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
done 1
|
||||
done 2
|
||||
done 3
|
||||
done 4
|
||||
done 5
|
||||
done 6
|
||||
task: [t1] echo done 1
|
||||
task: [t2] echo done 2
|
||||
task: [t3] echo done 3
|
||||
task: [t4] echo done 4
|
||||
task: [t5] echo done 5
|
||||
task: [t6] echo done 6
|
||||
1
testdata/deps/.gitignore
vendored
1
testdata/deps/.gitignore
vendored
@@ -1 +0,0 @@
|
||||
*.txt
|
||||
24
testdata/deps/Taskfile.yml
vendored
24
testdata/deps/Taskfile.yml
vendored
@@ -7,50 +7,50 @@ tasks:
|
||||
d1:
|
||||
deps: [d11, d12, d13]
|
||||
cmds:
|
||||
- echo 'Text' > d1.txt
|
||||
- echo 'd1'
|
||||
|
||||
d2:
|
||||
deps: [d21, d22, d23]
|
||||
cmds:
|
||||
- echo 'Text' > d2.txt
|
||||
- echo 'd2'
|
||||
|
||||
d3:
|
||||
deps: [d31, d32, d33]
|
||||
cmds:
|
||||
- echo 'Text' > d3.txt
|
||||
- echo 'd3'
|
||||
|
||||
d11:
|
||||
cmds:
|
||||
- echo 'Text' > d11.txt
|
||||
- echo 'd11'
|
||||
|
||||
d12:
|
||||
cmds:
|
||||
- echo 'Text' > d12.txt
|
||||
- echo 'd12'
|
||||
|
||||
d13:
|
||||
cmds:
|
||||
- echo 'Text' > d13.txt
|
||||
- echo 'd13'
|
||||
|
||||
d21:
|
||||
cmds:
|
||||
- echo 'Text' > d21.txt
|
||||
- echo 'd21'
|
||||
|
||||
d22:
|
||||
cmds:
|
||||
- echo 'Text' > d22.txt
|
||||
- echo 'd22'
|
||||
|
||||
d23:
|
||||
cmds:
|
||||
- echo 'Text' > d23.txt
|
||||
- echo 'd23'
|
||||
|
||||
d31:
|
||||
cmds:
|
||||
- echo 'Text' > d31.txt
|
||||
- echo 'd31'
|
||||
|
||||
d32:
|
||||
cmds:
|
||||
- echo 'Text' > d32.txt
|
||||
- echo 'd32'
|
||||
|
||||
d33:
|
||||
cmds:
|
||||
- echo 'Text' > d33.txt
|
||||
- echo 'd33'
|
||||
|
||||
1
testdata/deps/d1.txt
vendored
Normal file
1
testdata/deps/d1.txt
vendored
Normal file
@@ -0,0 +1 @@
|
||||
Text
|
||||
1
testdata/deps/d11.txt
vendored
Normal file
1
testdata/deps/d11.txt
vendored
Normal file
@@ -0,0 +1 @@
|
||||
Text
|
||||
1
testdata/deps/d12.txt
vendored
Normal file
1
testdata/deps/d12.txt
vendored
Normal file
@@ -0,0 +1 @@
|
||||
Text
|
||||
1
testdata/deps/d13.txt
vendored
Normal file
1
testdata/deps/d13.txt
vendored
Normal file
@@ -0,0 +1 @@
|
||||
Text
|
||||
1
testdata/deps/d2.txt
vendored
Normal file
1
testdata/deps/d2.txt
vendored
Normal file
@@ -0,0 +1 @@
|
||||
Text
|
||||
1
testdata/deps/d21.txt
vendored
Normal file
1
testdata/deps/d21.txt
vendored
Normal file
@@ -0,0 +1 @@
|
||||
Text
|
||||
1
testdata/deps/d22.txt
vendored
Normal file
1
testdata/deps/d22.txt
vendored
Normal file
@@ -0,0 +1 @@
|
||||
Text
|
||||
1
testdata/deps/d23.txt
vendored
Normal file
1
testdata/deps/d23.txt
vendored
Normal file
@@ -0,0 +1 @@
|
||||
Text
|
||||
1
testdata/deps/d3.txt
vendored
Normal file
1
testdata/deps/d3.txt
vendored
Normal file
@@ -0,0 +1 @@
|
||||
Text
|
||||
1
testdata/deps/d31.txt
vendored
Normal file
1
testdata/deps/d31.txt
vendored
Normal file
@@ -0,0 +1 @@
|
||||
Text
|
||||
1
testdata/deps/d32.txt
vendored
Normal file
1
testdata/deps/d32.txt
vendored
Normal file
@@ -0,0 +1 @@
|
||||
Text
|
||||
1
testdata/deps/d33.txt
vendored
Normal file
1
testdata/deps/d33.txt
vendored
Normal file
@@ -0,0 +1 @@
|
||||
Text
|
||||
12
testdata/deps/testdata/TestDeps.golden
vendored
Normal file
12
testdata/deps/testdata/TestDeps.golden
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
d1
|
||||
d11
|
||||
d12
|
||||
d13
|
||||
d2
|
||||
d21
|
||||
d22
|
||||
d23
|
||||
d3
|
||||
d31
|
||||
d32
|
||||
d33
|
||||
0
testdata/empty_task/testdata/TestEmptyTask.golden
vendored
Normal file
0
testdata/empty_task/testdata/TestEmptyTask.golden
vendored
Normal file
1
testdata/empty_taskfile/testdata/TestEmptyTaskfile-err-setup.golden
vendored
Normal file
1
testdata/empty_taskfile/testdata/TestEmptyTaskfile-err-setup.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
task: Missing schema version in Taskfile "/testdata/empty_taskfile/Taskfile.yml"
|
||||
0
testdata/empty_taskfile/testdata/TestEmptyTaskfile.golden
vendored
Normal file
0
testdata/empty_taskfile/testdata/TestEmptyTaskfile.golden
vendored
Normal file
1
testdata/env/.gitignore
vendored
1
testdata/env/.gitignore
vendored
@@ -1 +0,0 @@
|
||||
*.txt
|
||||
12
testdata/env/Taskfile.yml
vendored
12
testdata/env/Taskfile.yml
vendored
@@ -28,13 +28,13 @@ tasks:
|
||||
CGO_ENABLED:
|
||||
sh: echo '0'
|
||||
cmds:
|
||||
- echo "GOOS='$GOOS' GOARCH='$GOARCH' CGO_ENABLED='$CGO_ENABLED'" > local.txt
|
||||
- echo "GOOS='$GOOS' GOARCH='$GOARCH' CGO_ENABLED='$CGO_ENABLED'"
|
||||
|
||||
global:
|
||||
env:
|
||||
BAR: overridden
|
||||
cmds:
|
||||
- echo "FOO='$FOO' BAR='$BAR' BAZ='$BAZ'" > global.txt
|
||||
- echo "FOO='$FOO' BAR='$BAR' BAZ='$BAZ'"
|
||||
|
||||
multiple_type:
|
||||
env:
|
||||
@@ -42,15 +42,15 @@ tasks:
|
||||
BAR: true
|
||||
BAZ: 1.1
|
||||
cmds:
|
||||
- echo "FOO='$FOO' BAR='$BAR' BAZ='$BAZ'" > multiple_type.txt
|
||||
- echo "FOO='$FOO' BAR='$BAR' BAZ='$BAZ'"
|
||||
|
||||
not-overridden:
|
||||
cmds:
|
||||
- echo "QUX='$QUX'" > not-overridden.txt
|
||||
- echo "QUX='$QUX'"
|
||||
|
||||
overridden:
|
||||
cmds:
|
||||
- echo "QUX='$QUX'" > overridden.txt
|
||||
- echo "QUX='$QUX'"
|
||||
|
||||
dynamic:
|
||||
silent: true
|
||||
@@ -58,4 +58,4 @@ tasks:
|
||||
DYNAMIC_FOO:
|
||||
sh: echo $FOO
|
||||
cmds:
|
||||
- echo "{{ .DYNAMIC_FOO }}" > dynamic.txt
|
||||
- echo "{{ .DYNAMIC_FOO }}"
|
||||
|
||||
1
testdata/env/dynamic.txt
vendored
Normal file
1
testdata/env/dynamic.txt
vendored
Normal file
@@ -0,0 +1 @@
|
||||
foo
|
||||
1
testdata/env/global.txt
vendored
Normal file
1
testdata/env/global.txt
vendored
Normal file
@@ -0,0 +1 @@
|
||||
FOO='foo' BAR='overridden' BAZ='baz'
|
||||
1
testdata/env/local.txt
vendored
Normal file
1
testdata/env/local.txt
vendored
Normal file
@@ -0,0 +1 @@
|
||||
GOOS='linux' GOARCH='amd64' CGO_ENABLED='0'
|
||||
1
testdata/env/multiple_type.txt
vendored
Normal file
1
testdata/env/multiple_type.txt
vendored
Normal file
@@ -0,0 +1 @@
|
||||
FOO='1' BAR='true' BAZ='1.1'
|
||||
1
testdata/env/not-overridden.txt
vendored
Normal file
1
testdata/env/not-overridden.txt
vendored
Normal file
@@ -0,0 +1 @@
|
||||
QUX='from_os'
|
||||
1
testdata/env/overridden.txt
vendored
Normal file
1
testdata/env/overridden.txt
vendored
Normal file
@@ -0,0 +1 @@
|
||||
QUX='from_taskfile'
|
||||
5
testdata/env/testdata/TestEnv-env_precedence_disabled.golden
vendored
Normal file
5
testdata/env/testdata/TestEnv-env_precedence_disabled.golden
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
GOOS='linux' GOARCH='amd64' CGO_ENABLED='0'
|
||||
FOO='foo' BAR='overridden' BAZ='baz'
|
||||
QUX='from_os'
|
||||
FOO='1' BAR='true' BAZ='1.1'
|
||||
foo
|
||||
5
testdata/env/testdata/TestEnv-env_precedence_enabled.golden
vendored
Normal file
5
testdata/env/testdata/TestEnv-env_precedence_enabled.golden
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
GOOS='linux' GOARCH='amd64' CGO_ENABLED='0'
|
||||
FOO='foo' BAR='overridden' BAZ='baz'
|
||||
QUX='from_taskfile'
|
||||
FOO='1' BAR='true' BAZ='1.1'
|
||||
foo
|
||||
3
testdata/for/cmds/testdata/TestForCmds-loop-different-tasks.golden
vendored
Normal file
3
testdata/for/cmds/testdata/TestForCmds-loop-different-tasks.golden
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
1
|
||||
2
|
||||
3
|
||||
3
testdata/for/cmds/testdata/TestForCmds-loop-explicit.golden
vendored
Normal file
3
testdata/for/cmds/testdata/TestForCmds-loop-explicit.golden
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
a
|
||||
b
|
||||
c
|
||||
2
testdata/for/cmds/testdata/TestForCmds-loop-matrix-ref-error-err-run.golden
vendored
Normal file
2
testdata/for/cmds/testdata/TestForCmds-loop-matrix-ref-error-err-run.golden
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
task: Failed to parse /testdata/for/cmds/Taskfile.yml:
|
||||
matrix reference ".NOT_A_LIST" must resolve to a list
|
||||
0
testdata/for/cmds/testdata/TestForCmds-loop-matrix-ref-error.golden
vendored
Normal file
0
testdata/for/cmds/testdata/TestForCmds-loop-matrix-ref-error.golden
vendored
Normal file
6
testdata/for/cmds/testdata/TestForCmds-loop-matrix-ref.golden
vendored
Normal file
6
testdata/for/cmds/testdata/TestForCmds-loop-matrix-ref.golden
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
windows/amd64
|
||||
windows/arm64
|
||||
linux/amd64
|
||||
linux/arm64
|
||||
darwin/amd64
|
||||
darwin/arm64
|
||||
6
testdata/for/cmds/testdata/TestForCmds-loop-matrix.golden
vendored
Normal file
6
testdata/for/cmds/testdata/TestForCmds-loop-matrix.golden
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
windows/amd64
|
||||
windows/arm64
|
||||
linux/amd64
|
||||
linux/arm64
|
||||
darwin/amd64
|
||||
darwin/arm64
|
||||
2
testdata/for/cmds/testdata/TestForCmds-loop-sources-glob.golden
vendored
Normal file
2
testdata/for/cmds/testdata/TestForCmds-loop-sources-glob.golden
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
bar
|
||||
foo
|
||||
2
testdata/for/cmds/testdata/TestForCmds-loop-sources.golden
vendored
Normal file
2
testdata/for/cmds/testdata/TestForCmds-loop-sources.golden
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
bar
|
||||
foo
|
||||
2
testdata/for/cmds/testdata/TestForCmds-loop-task-as.golden
vendored
Normal file
2
testdata/for/cmds/testdata/TestForCmds-loop-task-as.golden
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
foo
|
||||
bar
|
||||
2
testdata/for/cmds/testdata/TestForCmds-loop-task.golden
vendored
Normal file
2
testdata/for/cmds/testdata/TestForCmds-loop-task.golden
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
foo
|
||||
bar
|
||||
2
testdata/for/cmds/testdata/TestForCmds-loop-vars-sh.golden
vendored
Normal file
2
testdata/for/cmds/testdata/TestForCmds-loop-vars-sh.golden
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
bar
|
||||
foo
|
||||
2
testdata/for/cmds/testdata/TestForCmds-loop-vars.golden
vendored
Normal file
2
testdata/for/cmds/testdata/TestForCmds-loop-vars.golden
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
foo
|
||||
bar
|
||||
3
testdata/for/deps/testdata/TestForDeps-loop-different-tasks.golden
vendored
Normal file
3
testdata/for/deps/testdata/TestForDeps-loop-different-tasks.golden
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
1
|
||||
2
|
||||
3
|
||||
3
testdata/for/deps/testdata/TestForDeps-loop-explicit.golden
vendored
Normal file
3
testdata/for/deps/testdata/TestForDeps-loop-explicit.golden
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
a
|
||||
b
|
||||
c
|
||||
2
testdata/for/deps/testdata/TestForDeps-loop-matrix-ref-error-err-run.golden
vendored
Normal file
2
testdata/for/deps/testdata/TestForDeps-loop-matrix-ref-error-err-run.golden
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
matrix reference ".NOT_A_LIST" must resolve to a list
|
||||
task: Failed to parse /testdata/for/deps/Taskfile.yml:
|
||||
1
testdata/for/deps/testdata/TestForDeps-loop-matrix-ref-error.golden
vendored
Normal file
1
testdata/for/deps/testdata/TestForDeps-loop-matrix-ref-error.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
6
testdata/for/deps/testdata/TestForDeps-loop-matrix-ref.golden
vendored
Normal file
6
testdata/for/deps/testdata/TestForDeps-loop-matrix-ref.golden
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
darwin/amd64
|
||||
darwin/arm64
|
||||
linux/amd64
|
||||
linux/arm64
|
||||
windows/amd64
|
||||
windows/arm64
|
||||
6
testdata/for/deps/testdata/TestForDeps-loop-matrix.golden
vendored
Normal file
6
testdata/for/deps/testdata/TestForDeps-loop-matrix.golden
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
darwin/amd64
|
||||
darwin/arm64
|
||||
linux/amd64
|
||||
linux/arm64
|
||||
windows/amd64
|
||||
windows/arm64
|
||||
2
testdata/for/deps/testdata/TestForDeps-loop-sources-glob.golden
vendored
Normal file
2
testdata/for/deps/testdata/TestForDeps-loop-sources-glob.golden
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
bar
|
||||
foo
|
||||
2
testdata/for/deps/testdata/TestForDeps-loop-sources.golden
vendored
Normal file
2
testdata/for/deps/testdata/TestForDeps-loop-sources.golden
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
bar
|
||||
foo
|
||||
2
testdata/for/deps/testdata/TestForDeps-loop-task-as.golden
vendored
Normal file
2
testdata/for/deps/testdata/TestForDeps-loop-task-as.golden
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
bar
|
||||
foo
|
||||
2
testdata/for/deps/testdata/TestForDeps-loop-task.golden
vendored
Normal file
2
testdata/for/deps/testdata/TestForDeps-loop-task.golden
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
bar
|
||||
foo
|
||||
2
testdata/for/deps/testdata/TestForDeps-loop-vars-sh.golden
vendored
Normal file
2
testdata/for/deps/testdata/TestForDeps-loop-vars-sh.golden
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
bar
|
||||
foo
|
||||
2
testdata/for/deps/testdata/TestForDeps-loop-vars.golden
vendored
Normal file
2
testdata/for/deps/testdata/TestForDeps-loop-vars.golden
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
bar
|
||||
foo
|
||||
2
testdata/label_list/testdata/TestNoLabelInList.golden
vendored
Normal file
2
testdata/label_list/testdata/TestNoLabelInList.golden
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
task: Available tasks for this project:
|
||||
* foo: task description
|
||||
1
testdata/label_status/testdata/TestLabel-status-err-status.golden
vendored
Normal file
1
testdata/label_status/testdata/TestLabel-status-err-status.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
task: Task "foobar" is not up-to-date
|
||||
0
testdata/label_status/testdata/TestLabel-status.golden
vendored
Normal file
0
testdata/label_status/testdata/TestLabel-status.golden
vendored
Normal file
1
testdata/label_summary/testdata/TestLabel-label_in_summary.golden
vendored
Normal file
1
testdata/label_summary/testdata/TestLabel-label_in_summary.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
task: Task "foobar" is up to date
|
||||
3
testdata/label_summary/testdata/TestLabel-summary.golden
vendored
Normal file
3
testdata/label_summary/testdata/TestLabel-summary.golden
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
task: foobar
|
||||
|
||||
description
|
||||
1
testdata/label_uptodate/testdata/TestLabel-up_to_date.golden
vendored
Normal file
1
testdata/label_uptodate/testdata/TestLabel-up_to_date.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
task: Task "foobar" is up to date
|
||||
1
testdata/label_var/testdata/TestLabel-var.golden
vendored
Normal file
1
testdata/label_var/testdata/TestLabel-var.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
task: Task "foobaz" is up to date
|
||||
3
testdata/list_desc_interpolation/testdata/TestListDescInterpolation.golden
vendored
Normal file
3
testdata/list_desc_interpolation/testdata/TestListDescInterpolation.golden
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
task: Available tasks for this project:
|
||||
* bar: task has desc with bar-var
|
||||
* foo: task has desc with foo-var
|
||||
4
testdata/list_mixed_desc/testdata/TestListAllShowsNoDesc.golden
vendored
Normal file
4
testdata/list_mixed_desc/testdata/TestListAllShowsNoDesc.golden
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
task: Available tasks for this project:
|
||||
* doo:
|
||||
* foo: foo has desc and label
|
||||
* voo:
|
||||
2
testdata/list_mixed_desc/testdata/TestListCanListDescOnly.golden
vendored
Normal file
2
testdata/list_mixed_desc/testdata/TestListCanListDescOnly.golden
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
task: Available tasks for this project:
|
||||
* foo: foo has desc and label
|
||||
1
testdata/params/.gitignore
vendored
1
testdata/params/.gitignore
vendored
@@ -1 +0,0 @@
|
||||
*.txt
|
||||
22
testdata/params/Taskfile.yml
vendored
22
testdata/params/Taskfile.yml
vendored
@@ -12,33 +12,33 @@ tasks:
|
||||
GERMAN: "Welt!"
|
||||
deps:
|
||||
- task: write-file
|
||||
vars: {CONTENT: Dependence1, FILE: dep1.txt}
|
||||
vars: {CONTENT: Dependence1}
|
||||
- task: write-file
|
||||
vars: {CONTENT: Dependence2, FILE: dep2.txt}
|
||||
vars: {CONTENT: Dependence2}
|
||||
- task: write-file
|
||||
vars: {CONTENT: "{{.SPANISH|replace \"mundo\" \"dependencia\"}}", FILE: spanish-dep.txt}
|
||||
vars: {CONTENT: "{{.SPANISH|replace \"mundo\" \"dependencia\"}}"}
|
||||
cmds:
|
||||
- task: write-file
|
||||
vars: {CONTENT: Hello, FILE: hello.txt}
|
||||
vars: {CONTENT: Hello}
|
||||
- task: write-file
|
||||
vars: {CONTENT: "$echo 'World'", FILE: world.txt}
|
||||
vars: {CONTENT: "$echo 'World'"}
|
||||
- task: write-file
|
||||
vars: {CONTENT: "!", FILE: exclamation.txt}
|
||||
vars: {CONTENT: "!"}
|
||||
- task: write-file
|
||||
vars: {CONTENT: "{{.SPANISH}}", FILE: spanish.txt}
|
||||
vars: {CONTENT: "{{.SPANISH}}"}
|
||||
- task: write-file
|
||||
vars: {CONTENT: "{{.PORTUGUESE}}", FILE: portuguese.txt}
|
||||
vars: {CONTENT: "{{.PORTUGUESE}}"}
|
||||
- task: write-file
|
||||
vars: {CONTENT: "{{.GERMAN}}", FILE: german.txt}
|
||||
vars: {CONTENT: "{{.GERMAN}}"}
|
||||
- task: non-default
|
||||
|
||||
write-file:
|
||||
cmds:
|
||||
- echo {{.CONTENT}} > {{.FILE}}
|
||||
- echo {{.CONTENT}}
|
||||
|
||||
non-default:
|
||||
vars:
|
||||
PORTUGUESE: "{{.PORTUGUESE_HELLO_WORLD}}"
|
||||
cmds:
|
||||
- task: write-file
|
||||
vars: {CONTENT: "{{.PORTUGUESE}}", FILE: portuguese2.txt}
|
||||
vars: {CONTENT: "{{.PORTUGUESE}}"}
|
||||
|
||||
1
testdata/params/dep1.txt
vendored
Normal file
1
testdata/params/dep1.txt
vendored
Normal file
@@ -0,0 +1 @@
|
||||
Dependence1
|
||||
1
testdata/params/dep2.txt
vendored
Normal file
1
testdata/params/dep2.txt
vendored
Normal file
@@ -0,0 +1 @@
|
||||
Dependence2
|
||||
1
testdata/params/exclamation.txt
vendored
Normal file
1
testdata/params/exclamation.txt
vendored
Normal file
@@ -0,0 +1 @@
|
||||
!
|
||||
1
testdata/params/german.txt
vendored
Normal file
1
testdata/params/german.txt
vendored
Normal file
@@ -0,0 +1 @@
|
||||
Welt!
|
||||
1
testdata/params/hello.txt
vendored
Normal file
1
testdata/params/hello.txt
vendored
Normal file
@@ -0,0 +1 @@
|
||||
Hello
|
||||
1
testdata/params/portuguese.txt
vendored
Normal file
1
testdata/params/portuguese.txt
vendored
Normal file
@@ -0,0 +1 @@
|
||||
Olá, mundo!
|
||||
1
testdata/params/portuguese2.txt
vendored
Normal file
1
testdata/params/portuguese2.txt
vendored
Normal file
@@ -0,0 +1 @@
|
||||
Olá, mundo!
|
||||
1
testdata/params/spanish-dep.txt
vendored
Normal file
1
testdata/params/spanish-dep.txt
vendored
Normal file
@@ -0,0 +1 @@
|
||||
¡Holla dependencia!
|
||||
1
testdata/params/spanish.txt
vendored
Normal file
1
testdata/params/spanish.txt
vendored
Normal file
@@ -0,0 +1 @@
|
||||
¡Holla mundo!
|
||||
10
testdata/params/testdata/TestParams.golden
vendored
Normal file
10
testdata/params/testdata/TestParams.golden
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
!
|
||||
Dependence1
|
||||
Dependence2
|
||||
Hello
|
||||
Olá, mundo!
|
||||
Olá, mundo!
|
||||
Welt!
|
||||
World
|
||||
¡Holla dependencia!
|
||||
¡Holla mundo!
|
||||
1
testdata/params/world.txt
vendored
Normal file
1
testdata/params/world.txt
vendored
Normal file
@@ -0,0 +1 @@
|
||||
World
|
||||
0
testdata/precondition/testdata/TestPrecondition-a_precondition_has_been_met.golden
vendored
Normal file
0
testdata/precondition/testdata/TestPrecondition-a_precondition_has_been_met.golden
vendored
Normal file
1
testdata/precondition/testdata/TestPrecondition-a_precondition_was_not_met-err-run.golden
vendored
Normal file
1
testdata/precondition/testdata/TestPrecondition-a_precondition_was_not_met-err-run.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
task: precondition not met
|
||||
1
testdata/precondition/testdata/TestPrecondition-a_precondition_was_not_met.golden
vendored
Normal file
1
testdata/precondition/testdata/TestPrecondition-a_precondition_was_not_met.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
task: 1 != 0 obviously!
|
||||
@@ -0,0 +1 @@
|
||||
task: Failed to run task "executes_failing_task_as_cmd": task: precondition not met
|
||||
1
testdata/precondition/testdata/TestPrecondition-precondition_in_cmd_fails_the_task.golden
vendored
Normal file
1
testdata/precondition/testdata/TestPrecondition-precondition_in_cmd_fails_the_task.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
task: 1 != 0 obviously!
|
||||
@@ -0,0 +1 @@
|
||||
task: precondition not met
|
||||
@@ -0,0 +1 @@
|
||||
task: 1 != 0 obviously!
|
||||
3
testdata/prompt/testdata/TestPromptAssumeYes---yes_flag_should_skip_prompt.golden
vendored
Normal file
3
testdata/prompt/testdata/TestPromptAssumeYes---yes_flag_should_skip_prompt.golden
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
Do you want to continue? [assuming yes]
|
||||
task: [foo] echo 'foo'
|
||||
foo
|
||||
@@ -0,0 +1 @@
|
||||
task: Task "foo" cancelled by user
|
||||
@@ -0,0 +1 @@
|
||||
Do you want to continue? [y/N]:
|
||||
@@ -0,0 +1 @@
|
||||
task: Task "foo" cancelled by user
|
||||
@@ -0,0 +1 @@
|
||||
Do you want to continue? [y/N]:
|
||||
@@ -0,0 +1 @@
|
||||
task: Task "foo" cancelled by user
|
||||
@@ -0,0 +1 @@
|
||||
Do you want to continue? [y/N]:
|
||||
2
testdata/prompt/testdata/TestPromptInSummary-test_long_approval-test_long_approval.golden
vendored
Normal file
2
testdata/prompt/testdata/TestPromptInSummary-test_long_approval-test_long_approval.golden
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
Do you want to continue? [y/N]: task: [foo] echo 'foo'
|
||||
foo
|
||||
2
testdata/prompt/testdata/TestPromptInSummary-test_short_approval-test_short_approval.golden
vendored
Normal file
2
testdata/prompt/testdata/TestPromptInSummary-test_short_approval-test_short_approval.golden
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
Do you want to continue? [y/N]: task: [foo] echo 'foo'
|
||||
foo
|
||||
1
testdata/prompt/testdata/TestPromptInSummary-test_stops_task-test_stops_task-err-run.golden
vendored
Normal file
1
testdata/prompt/testdata/TestPromptInSummary-test_stops_task-test_stops_task-err-run.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
task: Task "foo" cancelled by user
|
||||
1
testdata/prompt/testdata/TestPromptInSummary-test_stops_task-test_stops_task.golden
vendored
Normal file
1
testdata/prompt/testdata/TestPromptInSummary-test_stops_task-test_stops_task.golden
vendored
Normal file
@@ -0,0 +1 @@
|
||||
Do you want to continue? [y/N]:
|
||||
@@ -0,0 +1,2 @@
|
||||
Do you want to continue? [y/N]: task: [foo] echo 'foo'
|
||||
foo
|
||||
2
testdata/prompt/testdata/TestPromptWithIndirectTask.golden
vendored
Normal file
2
testdata/prompt/testdata/TestPromptWithIndirectTask.golden
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
Do you want to continue? [y/N]: task: [show-prompt] echo 'show-prompt'
|
||||
show-prompt
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user