1
0
mirror of https://github.com/go-task/task.git synced 2025-11-25 22:32:55 +02:00

Create v3 compiler which respects declaration order of variables

Also, fix "<no value>" been printed when a non-existing variable is printed.
This commit is contained in:
Andrey Nering
2020-05-16 15:45:41 -03:00
parent 4913b6a0f1
commit 68ce8642b1
31 changed files with 225 additions and 35 deletions

View File

@@ -107,6 +107,20 @@ func TestVarsV2(t *testing.T) {
tt.Run(t)
}
func TestVarsV3(t *testing.T) {
tt := fileContentTest{
Dir: "testdata/vars/v3",
Target: "default",
Files: map[string]string{
"missing-var.txt": "\n",
"var-order.txt": "ABCDEF\n",
"dependent-sh.txt": "123456\n",
"with-call.txt": "Hi, ABC123!\n",
},
}
tt.Run(t)
}
func TestMultilineVars(t *testing.T) {
for _, dir := range []string{"testdata/vars/v2/multiline"} {
tt := fileContentTest{