File:  [parser3project] / parser3 / tests / 434.html
Revision 1.2: download - view: text, annotated - select for diffs - revision graph
Fri Apr 24 19:06:17 2026 UTC (5 weeks, 1 day ago) by moko
Branches: MAIN
CVS tags: HEAD
test for ^A[v1;v2]=^array::create[v1;v2] added (related to feature #1282)

@main[]

1.  $a[v1;v2;$void;v5]
   ^a.count[]
    $a.8[v6] $a.10[v7] ^a.push[last]
    ^while(^a.count[all]){	^a.count[all] vs ^a.count[], pop '^a.pop[]'
    }

2.  $a[v1;v2]

   ^try-catch{ ^a.append[v3](2+2){^bug[]}[v4] }

   ^a.count[]
   ^show[$a]

   ^try-catch{ ^a.insert(1)(1+1){^bug[]}[v5] }

   ^a.count[]
   ^show[$a]

3. $a[^array::create[]]
   ^a.append[0;1]
   ^a.count[]
   ^a.insert(2)[2;3]
   ^a.count[]
   $a[^array::create[]]
   ^a.insert(2)[2;3]
   ^a.count[] // counted, OK


4. ^show[^A[]]
   ^show[^A[v1;v2]]

@show[v]
^json:string[$v; $.array[object] ]

E-mail: