summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKerin Millar <kfm@plushkava.net>2024-08-02 10:28:58 +0100
committerKerin Millar <kfm@plushkava.net>2024-08-02 17:21:14 +0100
commit8a83cf36a847fbd32990d3590bfd22a1516af898 (patch)
treef9111b8f7812353a075c76550acc5acdcc60d331 /test-functions
parentRender contains_all() and contains_any() faster (diff)
downloadgentoo-functions-8a83cf36a847fbd32990d3590bfd22a1516af898.tar.gz
gentoo-functions-8a83cf36a847fbd32990d3590bfd22a1516af898.tar.bz2
gentoo-functions-8a83cf36a847fbd32990d3590bfd22a1516af898.zip
Render hr() faster
Render hr() faster by eliminating the requirement to fork and execute any external utilities after having established the intended length of the rule. Also, use printf -v and string-replacing parameter expansion where the shell is found to be bash. Doing so helps considerably because bash is very slow at looping. Signed-off-by: Kerin Millar <kfm@plushkava.net>
Diffstat (limited to 'test-functions')
-rwxr-xr-xtest-functions2
1 files changed, 1 insertions, 1 deletions
diff --git a/test-functions b/test-functions
index f11234a..4b3107f 100755
--- a/test-functions
+++ b/test-functions
@@ -517,7 +517,7 @@ test_hr() {
eq 0 ----- - 5 \
eq 0 '' xyz 0 \
eq 0 x xyz 1 \
- eq 0 xyzxy xyz 5
+ eq 0 xxxxx xyz 5
callback() {
shift