Mercurial > hgrepos > FreeBSD > ports > sysutils > local-bsdtools
comparison tests/testsetup.sh @ 583:55c024c809ca
Begin unittests for farray.sh using "cram"
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Wed, 18 Sep 2024 00:46:17 +0200 |
| parents | |
| children | 45c47bc1f7d2 |
comparison
equal
deleted
inserted
replaced
| 582:22d35878f6f8 | 583:55c024c809ca |
|---|---|
| 1 #!/bin/sh | |
| 2 # | |
| 3 # Test helpers for the shell unittests using cram. | |
| 4 # | |
| 5 | |
| 6 #: | |
| 7 #: Check that no global variables that hold any array storage are left. | |
| 8 #: | |
| 9 #: Returns: | |
| 10 #: int: 0 if no unexpected storage is left, 1 otherwise | |
| 11 #: | |
| 12 check_no_array_artifacts() { | |
| 13 # _farr_A_ is the storage prefix for arrays | |
| 14 if set | grep -E -e '^_farr_A_.*='; then | |
| 15 return 1 | |
| 16 else | |
| 17 return 0 | |
| 18 fi | |
| 19 } |
