diff options
author | Justus Winter <[email protected]> | 2016-06-21 16:12:03 +0000 |
---|---|---|
committer | Justus Winter <[email protected]> | 2016-06-21 16:15:30 +0000 |
commit | c5e0ca5a59ebd91b67944ca125cc8cd73a9d243e (patch) | |
tree | 049184037f52c1048d6817677a5e56ee081d8b83 /tests/gpgscm/tests.scm | |
parent | tests/openpgp: Port the remaining tests to Scheme. (diff) | |
download | gnupg-c5e0ca5a59ebd91b67944ca125cc8cd73a9d243e.tar.gz gnupg-c5e0ca5a59ebd91b67944ca125cc8cd73a9d243e.zip |
gpgscm: Add more file handling functions.
* tests/gpgscm/ffi.c (do_glob): New function.
(ffi_init): Define new function.
* tests/gpgscm/tests.scm (basename-suffix): New function.x
Signed-off-by: Justus Winter <[email protected]>
Diffstat (limited to '')
-rw-r--r-- | tests/gpgscm/tests.scm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/gpgscm/tests.scm b/tests/gpgscm/tests.scm index 6d70dca5c..6c3eb7975 100644 --- a/tests/gpgscm/tests.scm +++ b/tests/gpgscm/tests.scm @@ -185,6 +185,12 @@ path (basename (substring path (+ 1 i) (string-length path)))))) +(define (basename-suffix path suffix) + (basename + (if (string-suffix? path suffix) + (substring path 0 (- (string-length path) (string-length suffix))) + path))) + ;; Helper for (pipe). (define :read-end car) (define :write-end cadr) |