comparison tests/farray-alist.t @ 615:454ce7fa25c8

farray.sh: Implement falist_items(), falist_keys() and falist_values()
author Franz Glasner <fzglas.hg@dom66.de>
date Fri, 20 Sep 2024 00:24:09 +0200
parents 62fbc4316d97
children 57ee25cec0dd
comparison
equal deleted inserted replaced
614:62fbc4316d97 615:454ce7fa25c8
314 $ falist_destroy UPDATE1 314 $ falist_destroy UPDATE1
315 $ falist_destroy UPDATE2 315 $ falist_destroy UPDATE2
316 $ falist_destroy EMPTY 316 $ falist_destroy EMPTY
317 317
318 $ check_no_alist_artifacts 318 $ check_no_alist_artifacts
319
320
321 Items / Keys / Values
322 =====================
323
324 $ farray_create KEYS
325 $ farray_create VALUES
326 $ farray_create ITEMS
327 $ falist_create LIST "Key 1" "Value 1" "Key 2" 'Value 2 '\'''
328 $ falist_items ITEMS LIST
329 $ farray_debug ITEMS
330 DEBUG: array `ITEMS' has length 4
331 DEBUG: its contents:
332 DEBUG: 1: `Key 1'
333 DEBUG: 2: `Value 1'
334 DEBUG: 3: `Key 2'
335 DEBUG: 4: `Value 2 ''
336 $ falist_keys KEYS LIST
337 $ farray_debug KEYS
338 DEBUG: array `KEYS' has length 2
339 DEBUG: its contents:
340 DEBUG: 1: `Key 1'
341 DEBUG: 2: `Key 2'
342 $ falist_values VALUES LIST
343 $ farray_debug VALUES
344 DEBUG: array `VALUES' has length 2
345 DEBUG: its contents:
346 DEBUG: 1: `Value 1'
347 DEBUG: 2: `Value 2 ''
348
349 $ falist_destroy LIST
350 $ farray_destroy KEYS
351 $ farray_destroy VALUES
352 $ farray_destroy ITEMS
353
354 $ check_no_alist_artifacts
355 $ check_no_array_artifacts