github.com/upcmd/up@v0.8.1-0.20230108151705-ad8b797bf04f/tests/modtests/0006/up.yml (about) 1 notes: 2 - regression test the multiple layer's call would work and vars will be handled properly 3 4 vars: 5 a: caller-global-aaa 6 b: caller-global-bbb 7 e: caller-global-eee 8 tasks: 9 - 10 name: Main 11 desc: main entry 12 task: 13 14 - 15 func: cmd 16 do: 17 - 18 name: inspect 19 desc: the vars in caller before invoking module task 20 cmd: 21 - exec_vars 22 - exec_base_vars 23 24 - 25 func: call 26 do: hello-module.Say_world 27 28 - 29 func: cmd 30 do: 31 - 32 name: inspect 33 desc: the vars in caller after invoking module task 34 cmd: 35 - exec_vars 36 - exec_base_vars 37 38 - 39 name: assert 40 desc: | 41 note the k is the result from the 2nd layer call 42 cmd: 43 - '{{eq .a "caller-global-aaa"}}' 44 - '{{eq .b "caller-global-bbb"}}' 45 - '{{eq .c "module-global-ccc"}}' 46 - '{{eq .e "caller-global-eee"}}' 47 - '{{eq .k "module-second_layer_local-kkk"}}'