github.com/upcmd/up@v0.8.1-0.20230108151705-ad8b797bf04f/tests/functests/c0070.yml (about) 1 doc_meta: | 2 folder: dvars 3 title: load file using dvar 4 head: | 5 Showcase dvar ref mechanism could be used to load file 6 7 sections: 8 - title: load a plain file using dvar 9 content: | 10 This demo shows that the ref element in dvar could be used to load a plain text file and the file does not have to be a template file 11 12 This could be used as one style for file loading 13 14 - title: Demo 15 log: yes 16 17 notes: 18 goal: 19 - demo use dvar ref to load common file only 20 21 dvars: 22 23 - name: mystory 24 ref: d0070.txt 25 26 tasks: 27 28 - name: task 29 task: 30 - 31 func: shell 32 do: 33 - echo """school address {{.mystory}}""" > /tmp/mystory.txt 34 - cat /tmp/mystory.txt