Skip to content

Commit f369b5a

Browse files
committed
fix tests
1 parent 4ea2580 commit f369b5a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+496
-499
lines changed

.github/workflows/build.yml

+1
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,5 @@ jobs:
4242
TERM: xterm
4343
run: |
4444
source bash-funk.sh
45+
source modules/test.sh
4546
-test-all

docs/ansi.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The following commands are available when this module is loaded:
1313
1. [-ansi-reset](#-ansi-reset)
1414
1. [-ansi-ul](#-ansi-ul)
1515
1. [-cursor-pos](#-cursor-pos)
16-
1. [-test-ansi](#-test-ansi)
16+
1. [-test-all-ansi](#-test-all-ansi)
1717

1818

1919
## <a name="license"></a>License
@@ -612,10 +612,10 @@ fi
612612
```
613613
614614
615-
## <a name="-test-ansi"></a>-test-ansi
615+
## <a name="-test-all-ansi"></a>-test-all-ansi
616616
617617
```
618-
Usage: -test-ansi [OPTION]...
618+
Usage: -test-all-ansi [OPTION]...
619619

620620
Performs a selftest of all functions of this module by executing each function with option '--selftest'.
621621

docs/aws.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The following commands are available when this module is loaded:
1616
1. [-aws-stack-name](#-aws-stack-name)
1717
1. [-aws-vpc-cidr-block](#-aws-vpc-cidr-block)
1818
1. [-aws-vpc-id](#-aws-vpc-id)
19-
1. [-test-aws](#-test-aws)
19+
1. [-test-all-aws](#-test-all-aws)
2020

2121

2222
## <a name="license"></a>License
@@ -312,10 +312,10 @@ $http_get http://169.254.169.254/latest/meta-data/network/interfaces/macs/$mac/v
312312
```
313313

314314

315-
## <a name="-test-aws"></a>-test-aws
315+
## <a name="-test-all-aws"></a>-test-all-aws
316316

317317
```
318-
Usage: -test-aws [OPTION]...
318+
Usage: -test-all-aws [OPTION]...
319319
320320
Performs a selftest of all functions of this module by executing each function with option '--selftest'.
321321

docs/compression.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The following commands are available when this module is loaded:
1515

1616
1. [-tar-gz](#-tar-gz)
1717
1. [-tar-zstd](#-tar-zstd)
18-
1. [-test-compression](#-test-compression)
18+
1. [-test-all-compression](#-test-all-compression)
1919
1. [-untar-gz](#-untar-gz)
2020
1. [-untar-zstd](#-untar-zstd)
2121

@@ -130,10 +130,10 @@ fi
130130
```
131131

132132

133-
## <a name="-test-compression"></a>-test-compression
133+
## <a name="-test-all-compression"></a>-test-all-compression
134134

135135
```
136-
Usage: -test-compression [OPTION]...
136+
Usage: -test-all-compression [OPTION]...
137137
138138
Performs a selftest of all functions of this module by executing each function with option '--selftest'.
139139

docs/crypto.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The following commands are available when this module is loaded:
66

77
1. [-md5sum](#-md5sum)
88
1. [-sha256sum](#-sha256sum)
9-
1. [-test-crypto](#-test-crypto)
9+
1. [-test-all-crypto](#-test-all-crypto)
1010
1. [-verify-tar-md5](#-verify-tar-md5)
1111

1212

@@ -118,10 +118,10 @@ fi
118118
```
119119

120120

121-
## <a name="-test-crypto"></a>-test-crypto
121+
## <a name="-test-all-crypto"></a>-test-all-crypto
122122

123123
```
124-
Usage: -test-crypto [OPTION]...
124+
Usage: -test-all-crypto [OPTION]...
125125
126126
Performs a selftest of all functions of this module by executing each function with option '--selftest'.
127127

docs/docker.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ The following commands are available when this module is loaded:
4949
1. [-docker-sh](#-docker-sh)
5050
1. [-docker-top](#-docker-top)
5151
1. [-swarm-cluster-id](#-swarm-cluster-id)
52-
1. [-test-docker](#-test-docker)
52+
1. [-test-all-docker](#-test-all-docker)
5353

5454

5555
## <a name="license"></a>License
@@ -229,10 +229,10 @@ sudo docker info 2>/dev/null | grep --color=never -oP '(?<=ClusterID: ).*'
229229
```
230230
231231
232-
## <a name="-test-docker"></a>-test-docker
232+
## <a name="-test-all-docker"></a>-test-all-docker
233233
234234
```
235-
Usage: -test-docker [OPTION]...
235+
Usage: -test-all-docker [OPTION]...
236236
237237
Performs a selftest of all functions of this module by executing each function with option '--selftest'.
238238

docs/filesystem.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The following commands are available when this module is loaded:
2121
1. [-sudo-append](#-sudo-append)
2222
1. [-sudo-write](#-sudo-write)
2323
1. [-tail-reverse](#-tail-reverse)
24-
1. [-test-filesystem](#-test-filesystem)
24+
1. [-test-all-filesystem](#-test-all-filesystem)
2525

2626

2727
## <a name="license"></a>License
@@ -880,10 +880,10 @@ fi
880880
```
881881

882882

883-
## <a name="-test-filesystem"></a>-test-filesystem
883+
## <a name="-test-all-filesystem"></a>-test-all-filesystem
884884

885885
```
886-
Usage: -test-filesystem [OPTION]...
886+
Usage: -test-all-filesystem [OPTION]...
887887
888888
Performs a selftest of all functions of this module by executing each function with option '--selftest'.
889889

docs/functions.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The following commands are available when this module is loaded:
88
1. [-fn-exists](#-fn-exists)
99
1. [-fn-rename](#-fn-rename)
1010
1. [-fn-unload](#-fn-unload)
11-
1. [-test-functions](#-test-functions)
11+
1. [-test-all-functions](#-test-all-functions)
1212

1313

1414
## <a name="license"></a>License
@@ -173,10 +173,10 @@ unset -f $_FUNC_NAME
173173
```
174174

175175

176-
## <a name="-test-functions"></a>-test-functions
176+
## <a name="-test-all-functions"></a>-test-all-functions
177177

178178
```
179-
Usage: -test-functions [OPTION]...
179+
Usage: -test-all-functions [OPTION]...
180180
181181
Performs a selftest of all functions of this module by executing each function with option '--selftest'.
182182

docs/git.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ The following commands are available when this module is loaded:
3636
1. [-git-undo](#-git-undo)
3737
1. [-git-update-branch](#-git-update-branch)
3838
1. [-github-upstream-url](#-github-upstream-url)
39-
1. [-test-git](#-test-git)
39+
1. [-test-all-git](#-test-all-git)
4040

4141

4242
## <a name="license"></a>License
@@ -915,10 +915,10 @@ return ${PIPESTATUS[0]}
915915
```
916916

917917

918-
## <a name="-test-git"></a>-test-git
918+
## <a name="-test-all-git"></a>-test-all-git
919919

920920
```
921-
Usage: -test-git [OPTION]...
921+
Usage: -test-all-git [OPTION]...
922922
923923
Performs a selftest of all functions of this module by executing each function with option '--selftest'.
924924

docs/math.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ The following commands are available when this module is loaded:
77
1. [-calc](#-calc)
88
1. [-round](#-round)
99
1. [-simple-calc](#-simple-calc)
10-
1. [-test-math](#-test-math)
10+
1. [-test-all-math](#-test-all-math)
1111

1212

1313
## <a name="license"></a>License
@@ -254,10 +254,10 @@ esac
254254
```
255255
256256
257-
## <a name="-test-math"></a>-test-math
257+
## <a name="-test-all-math"></a>-test-all-math
258258
259259
```
260-
Usage: -test-math [OPTION]...
260+
Usage: -test-all-math [OPTION]...
261261
262262
Performs a selftest of all functions of this module by executing each function with option '--selftest'.
263263

docs/memory.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ The following commands are available when this module is loaded:
99
1. [-meminfo](#-meminfo)
1010
1. [-memtotal](#-memtotal)
1111
1. [-procmem](#-procmem)
12-
1. [-test-memory](#-test-memory)
12+
1. [-test-all-memory](#-test-all-memory)
1313

1414

1515
## <a name="license"></a>License
@@ -266,10 +266,10 @@ fi
266266
```
267267

268268

269-
## <a name="-test-memory"></a>-test-memory
269+
## <a name="-test-all-memory"></a>-test-all-memory
270270

271271
```
272-
Usage: -test-memory [OPTION]...
272+
Usage: -test-all-memory [OPTION]...
273273
274274
Performs a selftest of all functions of this module by executing each function with option '--selftest'.
275275

docs/misc.md

+3-31
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ The following commands are available when this module is loaded:
2323
1. [-please](#-please)
2424
1. [-reload](#-reload)
2525
1. [-root](#-root)
26-
1. [-test-all](#-test-all)
27-
1. [-test-misc](#-test-misc)
26+
1. [-test-all-misc](#-test-all-misc)
2827
1. [-tweak-bash](#-tweak-bash)
2928
1. [-update](#-update)
3029
1. [-var-exists](#-var-exists)
@@ -264,36 +263,10 @@ sudo -i
264263
```
265264
266265
267-
## <a name="-test-all"></a>-test-all
266+
## <a name="-test-all-misc"></a>-test-all-misc
268267
269268
```
270-
Usage: -test-all [OPTION]...
271-
272-
Executes the selftests of all loaded bash-funk commands.
273-
274-
Options:
275-
--help
276-
Prints this help.
277-
--selftest
278-
Performs a self-test.
279-
--
280-
Terminates the option list.
281-
```
282-
283-
*Implementation:*
284-
```bash
285-
for testfunc in $(compgen -A function -- -test-); do
286-
if [[ $testfunc != "-test-all" ]]; then
287-
$testfunc || return 1
288-
fi
289-
done
290-
```
291-
292-
293-
## <a name="-test-misc"></a>-test-misc
294-
295-
```
296-
Usage: -test-misc [OPTION]...
269+
Usage: -test-all-misc [OPTION]...
297270
298271
Performs a selftest of all functions of this module by executing each function with option '--selftest'.
299272
@@ -313,7 +286,6 @@ Options:
313286
-please --selftest && echo || return 1
314287
-reload --selftest && echo || return 1
315288
-root --selftest && echo || return 1
316-
-test-all --selftest && echo || return 1
317289
-tweak-bash --selftest && echo || return 1
318290
-update --selftest && echo || return 1
319291
-var-exists --selftest && echo || return 1

docs/network.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ The following commands are available when this module is loaded:
1111
1. [-my-public-ip](#-my-public-ip)
1212
1. [-run-echo-server](#-run-echo-server)
1313
1. [-set-proxy](#-set-proxy)
14-
1. [-test-network](#-test-network)
14+
1. [-test-all-network](#-test-all-network)
1515

1616

1717
## <a name="license"></a>License
@@ -437,10 +437,10 @@ export NO_PROXY=$no_proxy
437437
```
438438

439439

440-
## <a name="-test-network"></a>-test-network
440+
## <a name="-test-all-network"></a>-test-all-network
441441

442442
```
443-
Usage: -test-network [OPTION]...
443+
Usage: -test-all-network [OPTION]...
444444
445445
Performs a selftest of all functions of this module by executing each function with option '--selftest'.
446446

docs/openssl.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The following commands are available when this module is loaded:
66

77
1. [-gen-x509cert](#-gen-x509cert)
88
1. [-gen-x509rootca](#-gen-x509rootca)
9-
1. [-test-openssl](#-test-openssl)
9+
1. [-test-all-openssl](#-test-all-openssl)
1010

1111

1212
## <a name="license"></a>License
@@ -194,10 +194,10 @@ echo " -> file [${_COMMON_NAME}.crt] created."
194194
```
195195

196196

197-
## <a name="-test-openssl"></a>-test-openssl
197+
## <a name="-test-all-openssl"></a>-test-all-openssl
198198

199199
```
200-
Usage: -test-openssl [OPTION]...
200+
Usage: -test-all-openssl [OPTION]...
201201
202202
Performs a selftest of all functions of this module by executing each function with option '--selftest'.
203203

docs/os.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The following commands are available when this module is loaded:
66

77
1. [-command-exists](#-command-exists)
88
1. [-pkg-installed](#-pkg-installed)
9-
1. [-test-os](#-test-os)
9+
1. [-test-all-os](#-test-all-os)
1010

1111

1212
## <a name="license"></a>License
@@ -133,10 +133,10 @@ return 1
133133
```
134134

135135

136-
## <a name="-test-os"></a>-test-os
136+
## <a name="-test-all-os"></a>-test-all-os
137137

138138
```
139-
Usage: -test-os [OPTION]...
139+
Usage: -test-all-os [OPTION]...
140140
141141
Performs a selftest of all functions of this module by executing each function with option '--selftest'.
142142

docs/performance.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ The following commands are available when this module is loaded:
99
1. [-disk-latency](#-disk-latency)
1010
1. [-disk-perf](#-disk-perf)
1111
1. [-scp-perf](#-scp-perf)
12-
1. [-test-performance](#-test-performance)
12+
1. [-test-all-performance](#-test-all-performance)
1313

1414

1515
## <a name="license"></a>License
@@ -270,10 +270,10 @@ rm $dataFile
270270
```
271271

272272

273-
## <a name="-test-performance"></a>-test-performance
273+
## <a name="-test-all-performance"></a>-test-all-performance
274274

275275
```
276-
Usage: -test-performance [OPTION]...
276+
Usage: -test-all-performance [OPTION]...
277277
278278
Performs a selftest of all functions of this module by executing each function with option '--selftest'.
279279

docs/processes.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ The following commands are available when this module is loaded:
99
1. [-get-toplevel-parent-pid](#-get-toplevel-parent-pid)
1010
1. [-kill-childs](#-kill-childs)
1111
1. [-kill-listener](#-kill-listener)
12-
1. [-test-processes](#-test-processes)
12+
1. [-test-all-processes](#-test-all-processes)
1313

1414

1515
## <a name="license"></a>License
@@ -239,10 +239,10 @@ fi
239239
```
240240

241241

242-
## <a name="-test-processes"></a>-test-processes
242+
## <a name="-test-all-processes"></a>-test-all-processes
243243

244244
```
245-
Usage: -test-processes [OPTION]...
245+
Usage: -test-all-processes [OPTION]...
246246
247247
Performs a selftest of all functions of this module by executing each function with option '--selftest'.
248248

0 commit comments

Comments
 (0)