# -*- coding: utf-8 -*- TITLE: toplevel template TAG: pi IN:

Hello

OUT:

Hello world!

TITLE: syntax error FILE: doc/synerr.html IN: bar baz ERROR: ^Unknown declarator \(\), at FILE: doc/nodecl.html IN: foo bar baz TITLE: file widget without decl IN: OUT: foo bar baz TITLE: one template, bodyless IN: world!

Hello

&perl:x; x &perl:y; = PARAM[ - 3 - 8 ] OUT:

Hello

3 x 8 = 24 world! TITLE: one template, with body IN: world!

Hello

&perl:x; x &perl:y; = PARAM[ - 8 - 3 ] OUT:

Hello world!

8 x 3 = 24 # ^Here is trailing newline. TITLE: one template, with body + arg IN: &yatt:p; world! &yatt:q;

Hello

PARAM[ ] OUT:

Hello foo world! bar

TITLE: Misplaced widget declaration. IN:
ERROR: Misplaced yatt:widget in: \([^\)]+\), at file \S+ line 4 TITLE: widget -> args ordering. BREAK: 1 IN: &yatt:x; - &yatt:y; &yatt:z; PARAM[ - a - b - c ] OUT: a - b c FILE: doc/envelope.html IN: &yatt:title;

&yatt:title;

TITLE: use of envelope IN: Hello world! OUT: foobar

foobar

Hello world! # XXX: 改行に不満あり TITLE: required arg ! IN: &yatt:x; &yatt:y; PARAM[ - - ] ERROR: ^Argument 'x' is missing \(\) TITLE: runtime error for required arg ! IN: &yatt:x; PARAM[ ] ERROR: ^Argument 'x' is undef! TITLE: arg default | IN:

&yatt:x; and &yatt:y;

PARAM[ ] OUT:

xval and 8

PARAM[ - - 0 ] OUT:

xval and 8

PARAM[ - foo - bar ] OUT:

foo and bar

TITLE: arg default ? IN:

&yatt:x; and &yatt:y;

PARAM[ ] OUT:

xval and 8

PARAM[ - - ] OUT:

xval and 8

PARAM[ - 0 - 0 ] OUT:

0 and 0

TITLE: arg default / IN:

&yatt:x; and &yatt:y;

PARAM[ ] OUT:

xval and 8

PARAM[ - - ] OUT:

and

PARAM[ - 0 - 0 ] OUT:

0 and 0

TITLE: arg default which refers other arg. IN:

&yatt:x; and &yatt:y;

PARAM[ ] OUT:

xval and foo(xval)

PARAM[ - - ] OUT:

xval and foo(xval)

PARAM[ - 0 ] OUT:

0 and foo(0)

TITLE: entvar escaping IN:

&yatt:x;

PARAM[ - &bar; ] OUT:

<foo>&bar;

TITLE: entvar(text) in mid of argument. TAG: entity TAG: var IN:

&yatt:x;

&yatt:y; PARAM[ - &bar; ] OUT:

pre<foo>&bar;post

moemoe
TITLE: entvar(scalar) IN:

&yatt:x; + 2 = &yatt:y;

OUT:

9 + 2 = 11

TITLE: entvar(list) IN:

OUT:

3, 4, 5, six

TITLE: entvar(html) IN: <:yatt:title>Bold foobar <:yatt:footer/> myfooter

&yatt:title;

&yatt:body;
OUT:

Bold

foobar
TITLE: entvar(code) IN: <:yatt:title>Bold foobar <:yatt:footer/> myfooter

&yatt:title();

&yatt:body();
OUT:

Bold

foobar
TITLE: var element IN: <:yatt:title>Bold foobar <:yatt:footer/> myfooter

OUT:

Bold

foobar
TITLE: bareword argument as pass thru. BREAK: 1 IN:

&yatt:y;

PARAM[ - foo ] OUT:

foo

TITLE: valueless scalar arg -> 1 IN: &yatt:x; OUT: 1 TITLE: valueless flag arg -> 1 IN: &yatt:x; OUT: 1 TITLE: valueless value arg -> 1 IN: &yatt:x; OUT: 1 TITLE: valueless arg other than scalar => error. IN: &yatt:x; ERROR: ^valueless arg 'x' TITLE: valueless arg pass thrue (text -> html) IN:

&yatt:x;

PARAM[ - foo ] OUT:

<b>foo</b>

TITLE: valueless arg pass thrue (html -> html) # html->as_escaped は as_lvalue と同じ値を返すので、これで大丈夫。 IN:

&yatt:x;

PARAM[ - foo ] OUT:

foo

TITLE: body pass thru, 3level IN: bar(&yatt:label;)
OUT:
    bar(foo)