Annotation of parser3/tests/341.html, revision 1.6
1.5 moko 1: @main[]
2:
3: I. named
4:
5: $id[id]
6: $price[price]
1.1 moko 7: $t[^table::create{id price
8: 1 6.50
1.5 moko 9: 2 70.00 more data
1.1 moko 10: 3 60.85
1.3 moko 11: _default 0
1.1 moko 12: }]
13:
14: $n[^table::create{name
15: id
16: price}]
17:
1.5 moko 18: ^core[]
19:
20: II. nameless
21:
22: $id[0]
23: $price[1]
24: $t[^table::create[nameless]{1 6.50
25: 2 70.00 more data
26: 3 60.85
27: _default 0
28: }]
29:
30: $n[^table::create{name
31: 0
32: 1}]
33:
34: ^core[]
35:
36: @core[]
37:
1.1 moko 38: Code coverage tests:
39:
1.5 moko 40: ^try-catch{^t.hash[$id][ $.type[wrong] ]}
41: ^try-catch{^t.hash[$id][ $.type[ $.not_string[] ] ]}
42: ^try-catch{^t.hash[$id][ $.wrong[option] ]}
43: ^try-catch{^t.hash[$id][$price][ not hash ]}
44: ^try-catch{^t.hash[$id][ $.wrong[] ][ $.type[string] ]}
45: ^try-catch{^t.hash[$id][$n][ $.type[string] ]}
46: ^try-catch{^t.hash[$id]{code}[ $.type[string] ]}
47: ^try-catch{^t.hash[ups;$price]}
48: ^try-catch{^t.hash[$id;ups]}
1.1 moko 49:
50: Valid calls tests:
51:
1.5 moko 52: 1. ^json:string[^t.hash[$id]]
53: 2. ^json:string[^t.hash[$id][ $.type[table] ]]
54: 3. ^json:string[^t.hash[$id][$price]]
55: 4. ^json:string[^t.hash{$id}[$price][ $.distinct(true) ]]
56: 5. ^json:string[^t.hash[$id][$n]]
57: 6. ^json:string[^t.hash{$id}[$n][ $.distinct(true) ]]
1.1 moko 58:
59: New functionality tests:
60:
1.5 moko 61: n1. ^json:string[^t.hash{=$t.$id=}{$t.$id - $t.$price}]
62: n2. ^json:string[^t.hash[$id]{$t.$id - $t.$price}]
63:
64: n3. ^json:string[^t.hash{$id}{code}[ $.distinct(true) ]]
65: n4. ^json:string[^t.hash[$id]{ $h[$.key[$t.$price]] $h }]
1.1 moko 66:
1.5 moko 67: n5. ^json:string[^t.hash[$id;]]
68: n6. ^json:string[^t.hash[$id;; $.type[string] ]]
E-mail: