Mercurial > hgrepos > FreeBSD > ports > sysutils > local-bsdtools
diff tests/farray-array.t @ 733:772e4999562b
farray.sh: Unified the output of farray_debug() and falist_debug()
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Mon, 07 Oct 2024 14:08:29 +0200 |
| parents | 8f1583faf9ea |
| children | bcfd8383a918 |
line wrap: on
line diff
--- a/tests/farray-array.t Mon Oct 07 13:34:28 2024 +0200 +++ b/tests/farray-array.t Mon Oct 07 14:08:29 2024 +0200 @@ -39,7 +39,7 @@ $ farray_istrue TEST $ farray_debug TEST DEBUG: array `TEST' has length 5 - DEBUG: its contents: + DEBUG: the items: DEBUG: 1: `0' DEBUG: 2: `1' DEBUG: 3: `2' @@ -47,7 +47,7 @@ DEBUG: 5: `" 678" \'90 ' # $ farray_debug "$TEST" # DEBUG: array with token `[a-f0-9]+' has length 5 (re) -# DEBUG: its contents: +# DEBUG: the items: # DEBUG: 1: `0' # DEBUG: 2: `1' # DEBUG: 3: `2' @@ -66,7 +66,7 @@ $ test ${_var} -eq 5 $ farray_debug TEST DEBUG: array `TEST' has length 5 - DEBUG: its contents: + DEBUG: the items: DEBUG: 1: `0' DEBUG: 2: `1' DEBUG: 3: `2' @@ -201,7 +201,7 @@ $ farray_del TEST 1 $ farray_debug TEST DEBUG: array `TEST' has length 5 - DEBUG: its contents: + DEBUG: the items: DEBUG: 1: `1' DEBUG: 2: `2' DEBUG: 3: `3 4 5' @@ -214,7 +214,7 @@ $ farray_del TEST 0 $ farray_debug TEST DEBUG: array `TEST' has length 5 - DEBUG: its contents: + DEBUG: the items: DEBUG: 1: `0' DEBUG: 2: `1' DEBUG: 3: `2' @@ -227,7 +227,7 @@ $ farray_del TEST 4 $ farray_debug TEST DEBUG: array `TEST' has length 5 - DEBUG: its contents: + DEBUG: the items: DEBUG: 1: `0' DEBUG: 2: `1' DEBUG: 3: `2' @@ -262,7 +262,7 @@ $ farray_set TEST "" $'the new value \\ \'' $ farray_debug TEST DEBUG: array `TEST' has length 7 - DEBUG: its contents: + DEBUG: the items: DEBUG: 1: `0' DEBUG: 2: `1' DEBUG: 3: `2' @@ -279,7 +279,7 @@ $ farray_set TEST 7 $'the new value \\ \'' $ farray_debug TEST DEBUG: array `TEST' has length 7 - DEBUG: its contents: + DEBUG: the items: DEBUG: 1: `0' DEBUG: 2: `1' DEBUG: 3: `2' @@ -296,7 +296,7 @@ $ farray_set TEST 0 $'the new replaced value \\ \'' $ farray_debug TEST DEBUG: array `TEST' has length 6 - DEBUG: its contents: + DEBUG: the items: DEBUG: 1: `0' DEBUG: 2: `1' DEBUG: 3: `2' @@ -312,7 +312,7 @@ $ farray_set TEST 1 $'the new replaced value \\ \'' $ farray_debug TEST DEBUG: array `TEST' has length 6 - DEBUG: its contents: + DEBUG: the items: DEBUG: 1: `the new replaced value \ '' DEBUG: 2: `1' DEBUG: 3: `2' @@ -328,7 +328,7 @@ $ farray_set TEST 5 $'the new replaced value \\ \' 2 ' $ farray_debug TEST DEBUG: array `TEST' has length 6 - DEBUG: its contents: + DEBUG: the items: DEBUG: 1: `0' DEBUG: 2: `1' DEBUG: 3: `2' @@ -359,7 +359,7 @@ $ farray_splice DELETED TEST 1 "" INSERTED $ farray_debug DELETED DEBUG: array `DELETED' has length 9 - DEBUG: its contents: + DEBUG: the items: DEBUG: 1: ` v 1 ' DEBUG: 2: ` v 2 ' DEBUG: 3: ` v 3 ' @@ -371,7 +371,7 @@ DEBUG: 9: ` v 9 ' $ farray_debug TEST DEBUG: array `TEST' has length 3 - DEBUG: its contents: + DEBUG: the items: DEBUG: 1: ` I 1 ' DEBUG: 2: ` I 2 ' DEBUG: 3: ` I 3 ' @@ -390,7 +390,7 @@ DEBUG: array `DELETED' has length 0 $ farray_debug TEST DEBUG: array `TEST' has length 12 - DEBUG: its contents: + DEBUG: the items: DEBUG: 1: ` I 1 ' DEBUG: 2: ` I 2 ' DEBUG: 3: ` I 3 ' @@ -418,7 +418,7 @@ DEBUG: array `DELETED' has length 0 $ farray_debug TEST DEBUG: array `TEST' has length 12 - DEBUG: its contents: + DEBUG: the items: DEBUG: 1: ` v 1 ' DEBUG: 2: ` v 2 ' DEBUG: 3: ` v 3 ' @@ -446,7 +446,7 @@ DEBUG: array `DELETED' has length 0 $ farray_debug TEST DEBUG: array `TEST' has length 12 - DEBUG: its contents: + DEBUG: the items: DEBUG: 1: ` v 1 ' DEBUG: 2: ` v 2 ' DEBUG: 3: ` v 3 ' @@ -472,7 +472,7 @@ $ farray_splice DELETED TEST 1 "" INSERTED $ farray_debug DELETED DEBUG: array `DELETED' has length 9 - DEBUG: its contents: + DEBUG: the items: DEBUG: 1: ` v 1 ' DEBUG: 2: ` v 2 ' DEBUG: 3: ` v 3 ' @@ -496,7 +496,7 @@ $ farray_splice DELETED TEST 1 "" $ farray_debug DELETED DEBUG: array `DELETED' has length 9 - DEBUG: its contents: + DEBUG: the items: DEBUG: 1: ` v 1 ' DEBUG: 2: ` v 2 ' DEBUG: 3: ` v 3 ' @@ -519,7 +519,7 @@ $ farray_splice DELETED TEST 2 5 $ farray_debug DELETED DEBUG: array `DELETED' has length 5 - DEBUG: its contents: + DEBUG: the items: DEBUG: 1: ` v 2 ' DEBUG: 2: ` v 3 ' DEBUG: 3: ` v 4 ' @@ -527,7 +527,7 @@ DEBUG: 5: ` v 6 ' $ farray_debug TEST DEBUG: array `TEST' has length 4 - DEBUG: its contents: + DEBUG: the items: DEBUG: 1: ` v 1 ' DEBUG: 2: ` v 7 ' DEBUG: 3: ` v 8 ' @@ -543,7 +543,7 @@ $ farray_splice DELETED TEST 1 6 $ farray_debug DELETED DEBUG: array `DELETED' has length 6 - DEBUG: its contents: + DEBUG: the items: DEBUG: 1: ` v 1 ' DEBUG: 2: ` v 2 ' DEBUG: 3: ` v 3 ' @@ -552,7 +552,7 @@ DEBUG: 6: ` v 6 ' $ farray_debug TEST DEBUG: array `TEST' has length 3 - DEBUG: its contents: + DEBUG: the items: DEBUG: 1: ` v 7 ' DEBUG: 2: ` v 8 ' DEBUG: 3: ` v 9 ' @@ -567,11 +567,11 @@ $ farray_splice DELETED TEST 0 1 $ farray_debug DELETED DEBUG: array `DELETED' has length 1 - DEBUG: its contents: + DEBUG: the items: DEBUG: 1: ` v 9 ' $ farray_debug TEST DEBUG: array `TEST' has length 8 - DEBUG: its contents: + DEBUG: the items: DEBUG: 1: ` v 1 ' DEBUG: 2: ` v 2 ' DEBUG: 3: ` v 3 ' @@ -591,12 +591,12 @@ $ farray_splice DELETED TEST -1 "" $ farray_debug DELETED DEBUG: array `DELETED' has length 2 - DEBUG: its contents: + DEBUG: the items: DEBUG: 1: ` v 8 ' DEBUG: 2: ` v 9 ' $ farray_debug TEST DEBUG: array `TEST' has length 7 - DEBUG: its contents: + DEBUG: the items: DEBUG: 1: ` v 1 ' DEBUG: 2: ` v 2 ' DEBUG: 3: ` v 3 ' @@ -616,14 +616,14 @@ $ farray_splice DELETED TEST 1 4 INSERTED $ farray_debug DELETED DEBUG: array `DELETED' has length 4 - DEBUG: its contents: + DEBUG: the items: DEBUG: 1: ` v 1 ' DEBUG: 2: ` v 2 ' DEBUG: 3: ` v 3 ' DEBUG: 4: ` v 4 ' $ farray_debug TEST DEBUG: array `TEST' has length 8 - DEBUG: its contents: + DEBUG: the items: DEBUG: 1: ` I 1 ' DEBUG: 2: ` I 2 ' DEBUG: 3: ` I 3 ' @@ -645,14 +645,14 @@ $ farray_splice DELETED TEST -3 4 INSERTED $ farray_debug DELETED DEBUG: array `DELETED' has length 4 - DEBUG: its contents: + DEBUG: the items: DEBUG: 1: ` v 6 ' DEBUG: 2: ` v 7 ' DEBUG: 3: ` v 8 ' DEBUG: 4: ` v 9 ' $ farray_debug TEST DEBUG: array `TEST' has length 8 - DEBUG: its contents: + DEBUG: the items: DEBUG: 1: ` v 1 ' DEBUG: 2: ` v 2 ' DEBUG: 3: ` v 3 ' @@ -674,14 +674,14 @@ $ farray_splice DELETED TEST 3 4 INSERTED $ farray_debug DELETED DEBUG: array `DELETED' has length 4 - DEBUG: its contents: + DEBUG: the items: DEBUG: 1: ` v 3 ' DEBUG: 2: ` v 4 ' DEBUG: 3: ` v 5 ' DEBUG: 4: ` v 6 ' $ farray_debug TEST DEBUG: array `TEST' has length 8 - DEBUG: its contents: + DEBUG: the items: DEBUG: 1: ` v 1 ' DEBUG: 2: ` v 2 ' DEBUG: 3: ` I 1 ' @@ -703,12 +703,12 @@ $ farray_splice DELETED TEST 1 2 INSERTED $ farray_debug DELETED DEBUG: array `DELETED' has length 2 - DEBUG: its contents: + DEBUG: the items: DEBUG: 1: ` v 1 ' DEBUG: 2: ` v 2 ' $ farray_debug TEST DEBUG: array `TEST' has length 10 - DEBUG: its contents: + DEBUG: the items: DEBUG: 1: ` I 1 ' DEBUG: 2: ` I 2 ' DEBUG: 3: ` I 3 ' @@ -732,12 +732,12 @@ $ farray_splice DELETED TEST -1 2 INSERTED $ farray_debug DELETED DEBUG: array `DELETED' has length 2 - DEBUG: its contents: + DEBUG: the items: DEBUG: 1: ` v 8 ' DEBUG: 2: ` v 9 ' $ farray_debug TEST DEBUG: array `TEST' has length 10 - DEBUG: its contents: + DEBUG: the items: DEBUG: 1: ` v 1 ' DEBUG: 2: ` v 2 ' DEBUG: 3: ` v 3 ' @@ -761,12 +761,12 @@ $ farray_splice DELETED TEST 3 2 INSERTED $ farray_debug DELETED DEBUG: array `DELETED' has length 2 - DEBUG: its contents: + DEBUG: the items: DEBUG: 1: ` v 3 ' DEBUG: 2: ` v 4 ' $ farray_debug TEST DEBUG: array `TEST' has length 10 - DEBUG: its contents: + DEBUG: the items: DEBUG: 1: ` v 1 ' DEBUG: 2: ` v 2 ' DEBUG: 3: ` I 1 ' @@ -790,13 +790,13 @@ $ farray_splice DELETED TEST 1 3 INSERTED $ farray_debug DELETED DEBUG: array `DELETED' has length 3 - DEBUG: its contents: + DEBUG: the items: DEBUG: 1: ` v 1 ' DEBUG: 2: ` v 2 ' DEBUG: 3: ` v 3 ' $ farray_debug TEST DEBUG: array `TEST' has length 9 - DEBUG: its contents: + DEBUG: the items: DEBUG: 1: ` I 1 ' DEBUG: 2: ` I 2 ' DEBUG: 3: ` I 3 ' @@ -819,13 +819,13 @@ $ farray_splice DELETED TEST -2 3 INSERTED $ farray_debug DELETED DEBUG: array `DELETED' has length 3 - DEBUG: its contents: + DEBUG: the items: DEBUG: 1: ` v 7 ' DEBUG: 2: ` v 8 ' DEBUG: 3: ` v 9 ' $ farray_debug TEST DEBUG: array `TEST' has length 9 - DEBUG: its contents: + DEBUG: the items: DEBUG: 1: ` v 1 ' DEBUG: 2: ` v 2 ' DEBUG: 3: ` v 3 ' @@ -848,13 +848,13 @@ $ farray_splice DELETED TEST 4 3 INSERTED $ farray_debug DELETED DEBUG: array `DELETED' has length 3 - DEBUG: its contents: + DEBUG: the items: DEBUG: 1: ` v 4 ' DEBUG: 2: ` v 5 ' DEBUG: 3: ` v 6 ' $ farray_debug TEST DEBUG: array `TEST' has length 9 - DEBUG: its contents: + DEBUG: the items: DEBUG: 1: ` v 1 ' DEBUG: 2: ` v 2 ' DEBUG: 3: ` v 3 ' @@ -1141,7 +1141,7 @@ $ farray_create TEST i1 i2 $ farray_debug TEST DEBUG: array `TEST' has length 2 - DEBUG: its contents: + DEBUG: the items: DEBUG: 1: `i1' DEBUG: 2: `i2' $ _farr_release_object "$TEST" @@ -1163,12 +1163,12 @@ $ farray_release ITEM1 $ farray_debug TEST DEBUG: array `TEST' has length 3 - DEBUG: its contents: + DEBUG: the items: DEBUG: 1: `i1' DEBUG: 2: `i2' - DEBUG: 3: --> + DEBUG: 3: >>> DEBUG: array with token `[a-f0-9]+' has length 2 (re) - DEBUG: its contents: + DEBUG: the items: DEBUG: 1: `i11' DEBUG: 2: `i22' $ farray_release TEST
