-
Notifications
You must be signed in to change notification settings - Fork 4
/
c0148.yml
71 lines (63 loc) · 1.56 KB
/
c0148.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
doc_meta: |
folder: vars
title: taskScope vars in block
head: |
This is a test case to show that the taskScope var used in block func could be accessed accross the whole block and the entire task
sections:
- title: Demo
log: yes
vars:
tom: this is tom
tasks:
-
name: task
task:
-
func: block
do:
-
func: cmd
dvars:
- name: jerry
value: this is jerry in task scope
flags:
- taskScope
-
func: cmd
do:
- name: print
desc: this should print out the dvar value of jerry
cmd: '{{.jerry}}'
-
func: cmd
do:
- name: print
desc: this should print out the dvar value of jerry
cmd: '{{.jerry}}'
-
func: call
do:
- subtask1
-
name: subtask1
task:
-
func: cmd
do:
- name: print
desc: this should print out the dvar value of jerry as it is declared jerry is in taskScope
cmd: '{{.jerry}}'
- name: trace
cmd: ===>
-
func: cmd
vars:
jerry: jerry is overriden in local scope
do:
- name: print
desc: |
remember that the caller's vars should override callee's vars
so jerry's value should the one from caller instead this local value
cmd: '{{.jerry}}'
- name: trace
cmd: <===