Mercurial > hgrepos > FreeBSD > ports > sysutils > local-bsdtools
comparison tests/farray-alist.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 | 05a325c7d5c5 |
| children | 772e4999562b |
comparison
equal
deleted
inserted
replaced
| 729:05a325c7d5c5 | 730:8f1583faf9ea |
|---|---|
| 28 $ falist_istrue LIST | 28 $ falist_istrue LIST |
| 29 [1] | 29 [1] |
| 30 $ falist_debug LIST | 30 $ falist_debug LIST |
| 31 DEBUG: alist `LIST' has length 0 | 31 DEBUG: alist `LIST' has length 0 |
| 32 | 32 |
| 33 $ falist_destroy LIST | 33 $ falist_release LIST |
| 34 $ ( falist_destroy LIST ) | 34 $ ( falist_release LIST ) |
| 35 ERROR: object `LIST' not created properly: token empty | 35 ERROR: object `LIST' not created properly: token empty |
| 36 [1] | 36 [1] |
| 37 | 37 |
| 38 $ check_no_alist_artifacts | 38 $ check_no_alist_artifacts |
| 39 | 39 |
| 64 $ falist_istrue LIST | 64 $ falist_istrue LIST |
| 65 [1] | 65 [1] |
| 66 $ falist_print_length LIST | 66 $ falist_print_length LIST |
| 67 0 (no-eol) | 67 0 (no-eol) |
| 68 | 68 |
| 69 $ falist_destroy LIST | 69 $ falist_release LIST |
| 70 $ falist_istrue LIST | 70 $ falist_istrue LIST |
| 71 ERROR: object `LIST' not created properly: token empty | 71 ERROR: object `LIST' not created properly: token empty |
| 72 [1] | 72 [1] |
| 73 $ check_no_alist_artifacts | 73 $ check_no_alist_artifacts |
| 74 | 74 |
| 124 DEBUG: alist `LIST' has length 4 | 124 DEBUG: alist `LIST' has length 4 |
| 125 DEBUG: `K1' -> `V1' | 125 DEBUG: `K1' -> `V1' |
| 126 DEBUG: `K2' -> `V2 2' | 126 DEBUG: `K2' -> `V2 2' |
| 127 DEBUG: `K3' -> `" 111222333" \'444555 ' | 127 DEBUG: `K3' -> `" 111222333" \'444555 ' |
| 128 DEBUG: `K4' -> `V4' | 128 DEBUG: `K4' -> `V4' |
| 129 $ falist_destroy LIST | 129 $ falist_release LIST |
| 130 $ check_no_alist_artifacts | 130 $ check_no_alist_artifacts |
| 131 | 131 |
| 132 | 132 |
| 133 Iteration | 133 Iteration |
| 134 ========= | 134 ========= |
| 177 EACH: _farr_KV\[\?,\?\]:[a-f0-9]+ key `K1', value `V1' at idx 1 (re) | 177 EACH: _farr_KV\[\?,\?\]:[a-f0-9]+ key `K1', value `V1' at idx 1 (re) |
| 178 EACH: _farr_KV\[\?,\?\]:[a-f0-9]+ key `K2', value `V2 2' at idx 2 (re) | 178 EACH: _farr_KV\[\?,\?\]:[a-f0-9]+ key `K2', value `V2 2' at idx 2 (re) |
| 179 EACH: _farr_KV\[\?,\?\]:[a-f0-9]+ key `K3', value `" 111222333" \\'444555 ' at idx 3 (re) | 179 EACH: _farr_KV\[\?,\?\]:[a-f0-9]+ key `K3', value `" 111222333" \\'444555 ' at idx 3 (re) |
| 180 | 180 |
| 181 $ falist_clear LIST | 181 $ falist_clear LIST |
| 182 $ falist_destroy LIST | 182 $ falist_release LIST |
| 183 $ falist_destroy LIST | 183 $ falist_release LIST |
| 184 ERROR: object `LIST' not created properly: token empty | 184 ERROR: object `LIST' not created properly: token empty |
| 185 [1] | 185 [1] |
| 186 | 186 |
| 187 $ check_no_alist_artifacts | 187 $ check_no_alist_artifacts |
| 188 | 188 |
| 214 KEY 1:VAL 1 (no-eol) | 214 KEY 1:VAL 1 (no-eol) |
| 215 | 215 |
| 216 $ falist_tryget_item_at_index _k _v LIST -3 | 216 $ falist_tryget_item_at_index _k _v LIST -3 |
| 217 [1] | 217 [1] |
| 218 | 218 |
| 219 $ falist_destroy LIST | 219 $ falist_release LIST |
| 220 $ check_no_alist_artifacts | 220 $ check_no_alist_artifacts |
| 221 | 221 |
| 222 | 222 |
| 223 Deletion of keys | 223 Deletion of keys |
| 224 ================ | 224 ================ |
| 245 value 2 (no-eol) | 245 value 2 (no-eol) |
| 246 $ falist_get _var LIST 'key 4' | 246 $ falist_get _var LIST 'key 4' |
| 247 $ printf '%s' "$_var" | 247 $ printf '%s' "$_var" |
| 248 value 4 (no-eol) | 248 value 4 (no-eol) |
| 249 | 249 |
| 250 $ falist_destroy LIST | 250 $ falist_release LIST |
| 251 | 251 |
| 252 $ check_no_alist_artifacts | 252 $ check_no_alist_artifacts |
| 253 | 253 |
| 254 | 254 |
| 255 Compare | 255 Compare |
| 291 [1] | 291 [1] |
| 292 | 292 |
| 293 $ falist_clear LIST3 | 293 $ falist_clear LIST3 |
| 294 $ falist_are_equal_with_order LIST2 LIST3 | 294 $ falist_are_equal_with_order LIST2 LIST3 |
| 295 | 295 |
| 296 $ falist_destroy LIST1 | 296 $ falist_release LIST1 |
| 297 $ falist_destroy LIST2 | 297 $ falist_release LIST2 |
| 298 $ falist_destroy LIST3 | 298 $ falist_release LIST3 |
| 299 $ falist_destroy LIST4 | 299 $ falist_release LIST4 |
| 300 | 300 |
| 301 $ check_no_alist_artifacts | 301 $ check_no_alist_artifacts |
| 302 | 302 |
| 303 | 303 |
| 304 Updating | 304 Updating |
| 333 $ falist_debug UPDATE1 | 333 $ falist_debug UPDATE1 |
| 334 DEBUG: alist `UPDATE1' has length 2 | 334 DEBUG: alist `UPDATE1' has length 2 |
| 335 DEBUG: `Key 1' -> `Value 1' | 335 DEBUG: `Key 1' -> `Value 1' |
| 336 DEBUG: `Key 2' -> `Value 2 '' | 336 DEBUG: `Key 2' -> `Value 2 '' |
| 337 | 337 |
| 338 $ falist_destroy ARR | 338 $ falist_release ARR |
| 339 $ falist_destroy UPDATE1 | 339 $ falist_release UPDATE1 |
| 340 $ falist_destroy UPDATE2 | 340 $ falist_release UPDATE2 |
| 341 $ falist_destroy EMPTY | 341 $ falist_release EMPTY |
| 342 | 342 |
| 343 $ check_no_alist_artifacts | 343 $ check_no_alist_artifacts |
| 344 | 344 |
| 345 | 345 |
| 346 Items / Keys / Values | 346 Items / Keys / Values |
| 369 DEBUG: array `VALUES' has length 2 | 369 DEBUG: array `VALUES' has length 2 |
| 370 DEBUG: its contents: | 370 DEBUG: its contents: |
| 371 DEBUG: 1: `Value 1' | 371 DEBUG: 1: `Value 1' |
| 372 DEBUG: 2: `Value 2 '' | 372 DEBUG: 2: `Value 2 '' |
| 373 | 373 |
| 374 $ falist_destroy LIST | 374 $ falist_release LIST |
| 375 $ farray_destroy KEYS | 375 $ farray_release KEYS |
| 376 $ farray_destroy VALUES | 376 $ farray_release VALUES |
| 377 $ farray_destroy ITEMS | 377 $ farray_release ITEMS |
| 378 | 378 |
| 379 $ check_no_alist_artifacts | 379 $ check_no_alist_artifacts |
| 380 | 380 |
| 381 | 381 |
| 382 Cross Type Checks | 382 Cross Type Checks |
| 384 | 384 |
| 385 $ falist_create LIST | 385 $ falist_create LIST |
| 386 $ (farray_append LIST value) | 386 $ (farray_append LIST value) |
| 387 ERROR: object `LIST' is not an array | 387 ERROR: object `LIST' is not an array |
| 388 [70] | 388 [70] |
| 389 $ falist_destroy LIST | 389 $ falist_release LIST |
| 390 $ check_no_alist_artifacts | 390 $ check_no_alist_artifacts |
| 391 | 391 |
| 392 | 392 |
| 393 Other Type Checks | 393 Other Type Checks |
| 394 ================= | 394 ================= |
| 407 [1] | 407 [1] |
| 408 $ falist_create LIST | 408 $ falist_create LIST |
| 409 $ falist_type LIST | 409 $ falist_type LIST |
| 410 alist (no-eol) | 410 alist (no-eol) |
| 411 $ falist_isalist LIST | 411 $ falist_isalist LIST |
| 412 $ falist_destroy LIST | 412 $ falist_release LIST |
| 413 $ check_no_alist_artifacts | 413 $ check_no_alist_artifacts |
| 414 | 414 |
| 415 | 415 |
| 416 Generic Destruction | 416 Generic Destruction |
| 417 =================== | 417 =================== |
| 435 | 435 |
| 436 $ falist_create LIST | 436 $ falist_create LIST |
| 437 $ falist_set LIST K1 V1 | 437 $ falist_set LIST K1 V1 |
| 438 $ falist_create ITEM1 K11 V11 K22 V22 | 438 $ falist_create ITEM1 K11 V11 K22 V22 |
| 439 $ falist_set LIST K2 "$ITEM1" | 439 $ falist_set LIST K2 "$ITEM1" |
| 440 $ falist_destroy ITEM1 | 440 $ falist_release ITEM1 |
| 441 $ falist_debug LIST | 441 $ falist_debug LIST |
| 442 DEBUG: alist `LIST' has length 2 | 442 DEBUG: alist `LIST' has length 2 |
| 443 DEBUG: `K1' -> `V1' | 443 DEBUG: `K1' -> `V1' |
| 444 DEBUG: `K2': --> | 444 DEBUG: `K2': --> |
| 445 DEBUG: alist with token `[a-f0-9]+' has length 2 (re) | 445 DEBUG: alist with token `[a-f0-9]+' has length 2 (re) |
| 446 DEBUG: `K11' -> `V11' | 446 DEBUG: `K11' -> `V11' |
| 447 DEBUG: `K22' -> `V22' | 447 DEBUG: `K22' -> `V22' |
| 448 $ falist_destroy LIST | 448 $ falist_release LIST |
| 449 $ check_no_alist_artifacts | 449 $ check_no_alist_artifacts |
