comparison 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
comparison
equal deleted inserted replaced
725:33293795caa6 726:23f6d2993fa2
1149 ERROR: farray `_farr_A\?:([a-f0-9]+)' not created properly: no storage for token `\1' (re) 1149 ERROR: farray `_farr_A\?:([a-f0-9]+)' not created properly: no storage for token `\1' (re)
1150 [1] 1150 [1]
1151 $ TEST='' 1151 $ TEST=''
1152 $ _farr_destroy_object "$TEST" 1152 $ _farr_destroy_object "$TEST"
1153 $ check_no_array_artifacts 1153 $ check_no_array_artifacts
1154
1155
1156 Complex Debug
1157 =============
1158
1159 $ farray_create TEST i1 i2
1160 $ farray_create ITEM1 i11 i22
1161 This also transfers ownership
1162 $ farray_append TEST "$ITEM1"
1163 $ farray_debug TEST
1164 DEBUG: array `TEST' has length 3
1165 DEBUG: its contents:
1166 DEBUG: 1: `i1'
1167 DEBUG: 2: `i2'
1168 DEBUG: 3: -->
1169 DEBUG: array with token `[a-f0-9]+' has length 2 (re)
1170 DEBUG: its contents:
1171 DEBUG: 1: `i11'
1172 DEBUG: 2: `i22'
1173 $ farray_destroy TEST
1174 $ check_no_array_artifacts