File:  [parser3project] / parser3 / tests / 341.html
Revision 1.2: download - view: text, annotated - select for diffs - revision graph
Fri Jul 29 22:35:02 2016 UTC (10 years, 1 month ago) by moko
Branches: MAIN
CVS tags: HEAD
test for ^t.hash[..;] added (related to feature #1057)

$t[^table::create{id	price
1	6.50
2	70.00
3	60.85
}]

$n[^table::create{name
id
price}]

Code coverage tests:

^try-catch{^t.hash[id][ $.type[wrong] ]}
^try-catch{^t.hash[id][ $.type[ $.not_string[] ] ]}
^try-catch{^t.hash[id][ $.wrong[option] ]}
^try-catch{^t.hash[id][price][ not hash ]}
^try-catch{^t.hash[id][ $.wrong[] ][ $.type[string] ]}
^try-catch{^t.hash[id][$n][ $.type[string] ]}
^try-catch{^t.hash[id]{code}[ $.type[string] ]}
^try-catch{^t.hash[ups;price]}
^try-catch{^t.hash[id;ups]}

Valid calls tests:

^json:string[^t.hash[id]]
^json:string[^t.hash[id][ $.type[table] ]]
^json:string[^t.hash[id][price]]
^json:string[^t.hash{id}[price][ $.distinct(true) ]]
^json:string[^t.hash[id][$n]]
^json:string[^t.hash{id}[$n][ $.distinct(true) ]]

New functionality tests:

^json:string[^t.hash{=$t.id=}{$t.id - $t.price}]
^json:string[^t.hash[id]{$t.id - $t.price}]

^json:string[^t.hash{id}{code}[ $.distinct(true) ]]
^json:string[^t.hash[id]{ $h[$.key[$t.price]] $h }]

^json:string[^t.hash[id;]]

E-mail: