Mercurial > hgrepos > FreeBSD > ports > sysutils > local-bsdtools
diff tests/farray-array.t @ 726:23f6d2993fa2
farray.sh: Test the debug output and the destruction of complex objects.
BUGS: No formal ownership management is done yet.
It is planned to implement resource management with reference counting.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Sun, 06 Oct 2024 16:19:45 +0200 |
| parents | 3adb26525b19 |
| children | 858f4208d9cb |
line wrap: on
line diff
--- a/tests/farray-array.t Sun Oct 06 05:56:27 2024 +0200 +++ b/tests/farray-array.t Sun Oct 06 16:19:45 2024 +0200 @@ -1151,3 +1151,24 @@ $ TEST='' $ _farr_destroy_object "$TEST" $ check_no_array_artifacts + + +Complex Debug +============= + + $ farray_create TEST i1 i2 + $ farray_create ITEM1 i11 i22 +This also transfers ownership + $ farray_append TEST "$ITEM1" + $ farray_debug TEST + DEBUG: array `TEST' has length 3 + DEBUG: its contents: + DEBUG: 1: `i1' + DEBUG: 2: `i2' + DEBUG: 3: --> + DEBUG: array with token `[a-f0-9]+' has length 2 (re) + DEBUG: its contents: + DEBUG: 1: `i11' + DEBUG: 2: `i22' + $ farray_destroy TEST + $ check_no_array_artifacts
