./aattest tests/data1
<<<
|BEGIN {
|print "Hello!"
|}
>>>
Hello!
>>>2
>>>= 0

./aattest tests/data2
<<<
@awk ../../data.awk
|END{
Hello {<name>}!
|}
---
name=world
>>>
Hello world!
>>>2
>>>= 0

./aattest tests/data3
<<<
@awk ../../data.awk
|END{
Hello {<name:"everyone">}!
|}
---
name=world
>>>
Hello world!
>>>2
>>>= 0

./aattest tests/data4
<<<
@awk ../../data.awk
|END{
Hello {<name:"everyone">}!
|}
---
>>>
Hello everyone!
>>>2
>>>= 0

./aattest tests/data5
<<<
@awk ../../data.awk
|END{
Hello {<name>}!
|}
---
>>> /Makefile:.*failed/
>>>2 /error: undefined scalar 'name'/
>>>= 2

./aattest tests/data6
<<<
@awk ../../data.awk
|END{
foo{<bar:>}baz
spam{<cheese:>}eggs
{<cheese:<bar>>}
{<cheese:'1+1'>}
{<cheese:'(<bar>)" "(<bar>)'>}
|}
---
bar=qux
>>>
fooquxbaz
spameggs
qux
2
qux qux
>>>2
>>>= 0

./aattest tests/data7
<<<
@awk ../../data.awk
|# START: sysresc/inherit/scriptsetup/data.aat
|END{
scriptsetup_src={<scriptsetup_src>}

scriptsetup_src_override=[
name	source
@for i in scriptsetup_src_override
{<i.name>}	{<i.source>}
@endfor
]

scriptsetup_packages=[
name
scriptsetup
]

role_sets=[
name
role-scriptsetup
]
|}
|# END: sysresc/inherit/scriptsetup/data.aat
---
scriptsetup_src=/home/ccx/bzr
bzr_overlay_src=/home/ccx/bzr

scriptsetup_src_override=[
name	source
c3net-python	/home/ccx/bzr/c3net/python-current
struct	/home/ccx/bzr/c3net/struct
]
>>>
scriptsetup_src=/home/ccx/bzr

scriptsetup_src_override=[
name	source
c3net-python	/home/ccx/bzr/c3net/python-current
struct	/home/ccx/bzr/c3net/struct
]

scriptsetup_packages=[
name
scriptsetup
]

role_sets=[
name
role-scriptsetup
]
>>>2
>>>= 0

./aattest tests/data8
<<<
@awk ../../data.awk
|END{
@for n in names
Hello {<n.name>}!
@endfor
|}
---
names=[
name
X
Y
]
>>>
Hello X!
Hello Y!
>>>2
>>>= 0

./aattest tests/data9
<<<
@awk ../../data.awk
|END{
@for n in names
Hello {<n.name>}!
@endfor
|}
---
>>> /Makefile:.*failed/
>>>2 /error: undefined table 'names'/
>>>= 2