File:  [parser3project] / parser3 / tests / 332.html
Revision 1.1: download - view: text, annotated - select for diffs - revision graph
Tue May 24 20:57:44 2016 UTC (10 years, 1 month ago) by moko
Branches: MAIN
CVS tags: release_3_5_1, release_3_5_0, release_3_4_6, release_3_4_5, HEAD
test for FIELDS_SYMBOL, _DEFAULT_SYMBOL, CALLER_SYMBOL, SELF_SYMBOL added (related to features #1056, #1026)

@main[][local]

$t[^table::create{c1	c2
v1	v2}]

$d[_default]

$h[^hash::create[
	$.a[a]
	$.$d[empty]
]]

#works
$f[fields]
t.fields:^json:string[$t.$f]
h.fields:^json:string[$h.$f]

#should not work
$f[lds] $f[fie$f]
t.fields:^try-catch{^json:string[$t.$f]}
h.fields:^json:string[$h.$f]

#works
404:$h.404

#should not work
$d[_] $d[${d}default]

$h[^hash::create[
	$.a[a]
	$.$d[empty]
]]

404:$h.404

$test[test]
$local[local]
^method[]

@method[]
#works
$c[caller]
local:$local
caller local:$$c.local

$s[self]
test:$$s.test

#should not work
$c[r] $c[calle$c]

caller local:$$c.local

$s[f] $s[sel$s]

test:$$s.test

E-mail: