mirror of
https://github.com/go-task/task.git
synced 2025-11-23 22:24:45 +02:00
simplify getVariables() and improve nested variables support
/cc @smyrman
This commit is contained in:
@@ -72,17 +72,16 @@ func TestVars(t *testing.T) {
|
||||
Target: "default",
|
||||
TrimSpace: true,
|
||||
Files: map[string]string{
|
||||
// hello task:
|
||||
"foo.txt": "foo",
|
||||
"bar.txt": "bar",
|
||||
"baz.txt": "baz",
|
||||
"tmpl_foo.txt": "foo",
|
||||
"tmpl_bar.txt": "<no value>",
|
||||
"tmpl_bar.txt": "bar",
|
||||
"tmpl_foo2.txt": "foo2",
|
||||
"tmpl_bar2.txt": "bar2",
|
||||
"shtmpl_foo.txt": "foo",
|
||||
"shtmpl_foo2.txt": "foo2",
|
||||
"nestedtmpl_foo.txt": "{{.FOO}}",
|
||||
"nestedtmpl_foo.txt": "<no value>",
|
||||
"nestedtmpl_foo2.txt": "foo2",
|
||||
"foo2.txt": "foo2",
|
||||
"bar2.txt": "bar2",
|
||||
@@ -90,10 +89,10 @@ func TestVars(t *testing.T) {
|
||||
"tmpl2_foo.txt": "<no value>",
|
||||
"tmpl2_foo2.txt": "foo2",
|
||||
"tmpl2_bar.txt": "<no value>",
|
||||
"tmpl2_bar2.txt": "<no value>",
|
||||
"tmpl2_bar2.txt": "bar2",
|
||||
"shtmpl2_foo.txt": "<no value>",
|
||||
"shtmpl2_foo2.txt": "foo2",
|
||||
"nestedtmpl2_foo2.txt": "{{.FOO2}}",
|
||||
"nestedtmpl2_foo2.txt": "<no value>",
|
||||
"override.txt": "bar",
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user