Mercurial > hgrepos > FreeBSD > ports > sysutils > local-bsdtools
comparison tests/farray-object.t @ 730:8f1583faf9ea
farray.sh: Rename farray_destroy() to farray_release() and falist_destroy() to falist_release()
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Mon, 07 Oct 2024 12:57:29 +0200 |
| parents | 858f4208d9cb |
| children | d92e7203a14d |
comparison
equal
deleted
inserted
replaced
| 729:05a325c7d5c5 | 730:8f1583faf9ea |
|---|---|
| 16 ===== | 16 ===== |
| 17 | 17 |
| 18 $ farray_create ARRAY1 i1 i2 | 18 $ farray_create ARRAY1 i1 i2 |
| 19 $ farray_create ITEM1 i11 i22 | 19 $ farray_create ITEM1 i11 i22 |
| 20 $ farray_append ARRAY1 "$ITEM1" | 20 $ farray_append ARRAY1 "$ITEM1" |
| 21 $ farray_destroy ITEM1 | 21 $ farray_release ITEM1 |
| 22 $ falist_create LIST2 k1 v1 k2 v2 k3 v3 | 22 $ falist_create LIST2 k1 v1 k2 v2 k3 v3 |
| 23 This also transfers ownership | 23 This also transfers ownership |
| 24 $ farray_append ARRAY1 "$LIST2" | 24 $ farray_append ARRAY1 "$LIST2" |
| 25 $ falist_destroy LIST2 | 25 $ falist_release LIST2 |
| 26 $ farray_debug ARRAY1 | 26 $ farray_debug ARRAY1 |
| 27 DEBUG: array `ARRAY1' has length 4 | 27 DEBUG: array `ARRAY1' has length 4 |
| 28 DEBUG: its contents: | 28 DEBUG: its contents: |
| 29 DEBUG: 1: `i1' | 29 DEBUG: 1: `i1' |
| 30 DEBUG: 2: `i2' | 30 DEBUG: 2: `i2' |
| 36 DEBUG: 4: --> | 36 DEBUG: 4: --> |
| 37 DEBUG: alist with token `[a-f0-9]+' has length 3 (re) | 37 DEBUG: alist with token `[a-f0-9]+' has length 3 (re) |
| 38 DEBUG: `k1' -> `v1' | 38 DEBUG: `k1' -> `v1' |
| 39 DEBUG: `k2' -> `v2' | 39 DEBUG: `k2' -> `v2' |
| 40 DEBUG: `k3' -> `v3' | 40 DEBUG: `k3' -> `v3' |
| 41 $ farray_destroy ARRAY1 | 41 $ farray_release ARRAY1 |
| 42 $ check_no_array_artifacts | 42 $ check_no_array_artifacts |
| 43 $ check_no_alist_artifacts | 43 $ check_no_alist_artifacts |
| 44 | 44 |
| 45 | 45 |
| 46 AList | 46 AList |
| 47 ===== | 47 ===== |
| 48 | 48 |
| 49 $ falist_create LIST1 k1 v1 | 49 $ falist_create LIST1 k1 v1 |
| 50 $ falist_create ITEM1 k11 v11 k22 v22 k33 v33 k44 v44 | 50 $ falist_create ITEM1 k11 v11 k22 v22 k33 v33 k44 v44 |
| 51 $ falist_set LIST1 k2 "$ITEM1" | 51 $ falist_set LIST1 k2 "$ITEM1" |
| 52 $ falist_destroy ITEM1 | 52 $ falist_release ITEM1 |
| 53 $ farray_create ARRAY2 a1 a2 a3 | 53 $ farray_create ARRAY2 a1 a2 a3 |
| 54 $ falist_set LIST1 k3 "$ARRAY2" | 54 $ falist_set LIST1 k3 "$ARRAY2" |
| 55 $ farray_destroy ARRAY2 | 55 $ farray_release ARRAY2 |
| 56 $ falist_debug LIST1 | 56 $ falist_debug LIST1 |
| 57 DEBUG: alist `LIST1' has length 3 | 57 DEBUG: alist `LIST1' has length 3 |
| 58 DEBUG: `k1' -> `v1' | 58 DEBUG: `k1' -> `v1' |
| 59 DEBUG: `k2': --> | 59 DEBUG: `k2': --> |
| 60 DEBUG: alist with token `[a-f0-9]+' has length 4 (re) | 60 DEBUG: alist with token `[a-f0-9]+' has length 4 (re) |
| 67 DEBUG: its contents: | 67 DEBUG: its contents: |
| 68 DEBUG: 1: `a1' | 68 DEBUG: 1: `a1' |
| 69 DEBUG: 2: `a2' | 69 DEBUG: 2: `a2' |
| 70 DEBUG: 3: `a3' | 70 DEBUG: 3: `a3' |
| 71 | 71 |
| 72 $ falist_destroy LIST1 | 72 $ falist_release LIST1 |
| 73 $ check_no_array_artifacts | 73 $ check_no_array_artifacts |
| 74 $ check_no_alist_artifacts | 74 $ check_no_alist_artifacts |
