Mercurial > hgrepos > FreeBSD > ports > sysutils > local-bsdtools
comparison tests/farray-alist.t @ 613:17194ffe3638
farray.sh: falist_create() and falist_set() now accept a sequence of key-value pairs.
This sequence may be empty.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Thu, 19 Sep 2024 20:03:29 +0200 |
| parents | c9ef2339618d |
| children | 62fbc4316d97 |
comparison
equal
deleted
inserted
replaced
| 612:c9ef2339618d | 613:17194ffe3638 |
|---|---|
| 228 | 228 |
| 229 | 229 |
| 230 Compare | 230 Compare |
| 231 ======= | 231 ======= |
| 232 | 232 |
| 233 $ falist_create LIST1 | 233 $ falist_create LIST1 K1 V1 K2 V2 |
| 234 $ falist_set LIST1 K1 V1 | 234 $ falist_debug LIST1 |
| 235 $ falist_set LIST1 K2 V2 | 235 DEBUG: alist `LIST1' has length 2 |
| 236 | 236 DEBUG: `K1' -> `V1' |
| 237 $ falist_create LIST2 | 237 DEBUG: `K2' -> `V2' |
| 238 $ falist_set LIST2 K2 V2 | 238 |
| 239 $ falist_set LIST2 K1 V1 | 239 $ falist_create LIST2 K2 V2 K1 V1 |
| 240 | 240 $ falist_debug LIST2 |
| 241 $ falist_create LIST3 | 241 DEBUG: alist `LIST2' has length 2 |
| 242 $ falist_set LIST3 K1 V1 | 242 DEBUG: `K2' -> `V2' |
| 243 $ falist_set LIST3 K2 V2 | 243 DEBUG: `K1' -> `V1' |
| 244 | 244 |
| 245 $ falist_create LIST4 | 245 $ falist_create LIST3 K1 V1 K2 V2 |
| 246 $ falist_set LIST4 K1 V1 | 246 $ falist_debug LIST3 |
| 247 $ falist_set LIST4 K2 V2-4 | 247 DEBUG: alist `LIST3' has length 2 |
| 248 DEBUG: `K1' -> `V1' | |
| 249 DEBUG: `K2' -> `V2' | |
| 250 | |
| 251 $ falist_create LIST4 K1 V1 K2 V2-4 | |
| 252 $ falist_debug LIST4 | |
| 253 DEBUG: alist `LIST4' has length 2 | |
| 254 DEBUG: `K1' -> `V1' | |
| 255 DEBUG: `K2' -> `V2-4' | |
| 248 | 256 |
| 249 $ falist_are_equal LIST1 LIST2 | 257 $ falist_are_equal LIST1 LIST2 |
| 250 $ falist_are_equal LIST1 LIST4 | 258 $ falist_are_equal LIST1 LIST4 |
| 251 [1] | 259 [1] |
| 252 $ falist_are_equal_with_order LIST1 LIST2 | 260 $ falist_are_equal_with_order LIST1 LIST2 |
