aboutsummaryrefslogtreecommitdiffstats
path: root/tests/gpgscm/lib.scm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/gpgscm/lib.scm')
-rw-r--r--tests/gpgscm/lib.scm8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/gpgscm/lib.scm b/tests/gpgscm/lib.scm
index 2cfe725e9..ed3d572c1 100644
--- a/tests/gpgscm/lib.scm
+++ b/tests/gpgscm/lib.scm
@@ -95,10 +95,10 @@
(let ((length (string-length haystack)))
(define (split acc offset n)
(if (>= offset length)
- (reverse acc)
+ (reverse! acc)
(let ((i (lookahead haystack offset)))
(if (or (eq? i #f) (= 0 n))
- (reverse (cons (substring haystack offset length) acc))
+ (reverse! (cons (substring haystack offset length) acc))
(split (cons (substring haystack offset i) acc)
(+ i 1) (- n 1))))))
(split '() 0 n)))
@@ -168,10 +168,10 @@
(define (string-rtrim predicate s)
(if (string=? s "")
""
- (let loop ((s' (reverse (string->list s))))
+ (let loop ((s' (reverse! (string->list s))))
(if (predicate (car s'))
(loop (cdr s'))
- (list->string (reverse s'))))))
+ (list->string (reverse! s'))))))
(assert (string=? "" (string-rtrim char-whitespace? "")))
(assert (string=? "foo" (string-rtrim char-whitespace? "foo ")))