@@ -14,7 +14,7 @@ func TestArgs(t *testing.T) {
1414 tests := []struct {
1515 Args []string
1616 ExpectedCalls []taskfile.Call
17- ExpectedGlobals taskfile.Vars
17+ ExpectedGlobals * taskfile.Vars
1818 }{
1919 {
2020 Args : []string {"task-a" , "task-b" , "task-c" },
@@ -29,16 +29,22 @@ func TestArgs(t *testing.T) {
2929 ExpectedCalls : []taskfile.Call {
3030 {
3131 Task : "task-a" ,
32- Vars : taskfile.Vars {
33- "FOO" : taskfile.Var {Static : "bar" },
32+ Vars : & taskfile.Vars {
33+ Keys : []string {"FOO" },
34+ Mapping : map [string ]taskfile.Var {
35+ "FOO" : taskfile.Var {Static : "bar" },
36+ },
3437 },
3538 },
3639 {Task : "task-b" },
3740 {
3841 Task : "task-c" ,
39- Vars : taskfile.Vars {
40- "BAR" : taskfile.Var {Static : "baz" },
41- "BAZ" : taskfile.Var {Static : "foo" },
42+ Vars : & taskfile.Vars {
43+ Keys : []string {"BAR" , "BAZ" },
44+ Mapping : map [string ]taskfile.Var {
45+ "BAR" : taskfile.Var {Static : "baz" },
46+ "BAZ" : taskfile.Var {Static : "foo" },
47+ },
4248 },
4349 },
4450 },
@@ -48,8 +54,11 @@ func TestArgs(t *testing.T) {
4854 ExpectedCalls : []taskfile.Call {
4955 {
5056 Task : "task-a" ,
51- Vars : taskfile.Vars {
52- "CONTENT" : taskfile.Var {Static : "with some spaces" },
57+ Vars : & taskfile.Vars {
58+ Keys : []string {"CONTENT" },
59+ Mapping : map [string ]taskfile.Var {
60+ "CONTENT" : taskfile.Var {Static : "with some spaces" },
61+ },
5362 },
5463 },
5564 },
@@ -60,8 +69,11 @@ func TestArgs(t *testing.T) {
6069 {Task : "task-a" },
6170 {Task : "task-b" },
6271 },
63- ExpectedGlobals : taskfile.Vars {
64- "FOO" : {Static : "bar" },
72+ ExpectedGlobals : & taskfile.Vars {
73+ Keys : []string {"FOO" },
74+ Mapping : map [string ]taskfile.Var {
75+ "FOO" : {Static : "bar" },
76+ },
6577 },
6678 },
6779 {
@@ -81,9 +93,12 @@ func TestArgs(t *testing.T) {
8193 ExpectedCalls : []taskfile.Call {
8294 {Task : "default" },
8395 },
84- ExpectedGlobals : taskfile.Vars {
85- "FOO" : {Static : "bar" },
86- "BAR" : {Static : "baz" },
96+ ExpectedGlobals : & taskfile.Vars {
97+ Keys : []string {"FOO" , "BAR" },
98+ Mapping : map [string ]taskfile.Var {
99+ "FOO" : {Static : "bar" },
100+ "BAR" : {Static : "baz" },
101+ },
87102 },
88103 },
89104 }
0 commit comments