search-paths: Export 'string-tokenize*'.

* guix/search-paths.scm (string-tokenize*): Export.
* tests/utils.scm ("string-tokenize*"): Adjust accordingly.
This commit is contained in:
Ludovic Courtès 2015-05-06 11:10:24 +02:00
parent b5cd1e4f93
commit d838e70298
2 changed files with 6 additions and 5 deletions

View file

@ -35,6 +35,7 @@ (define-module (guix search-paths)
search-path-specification->sexp search-path-specification->sexp
sexp->search-path-specification sexp->search-path-specification
string-tokenize*
evaluate-search-paths evaluate-search-paths
environment-variable-definition environment-variable-definition
search-path-definition)) search-path-definition))

View file

@ -21,6 +21,7 @@ (define-module (test-utils)
#:use-module ((guix config) #:select (%gzip)) #:use-module ((guix config) #:select (%gzip))
#:use-module (guix utils) #:use-module (guix utils)
#:use-module ((guix store) #:select (%store-prefix store-path-package-name)) #:use-module ((guix store) #:select (%store-prefix store-path-package-name))
#:use-module ((guix search-paths) #:select (string-tokenize*))
#:use-module (srfi srfi-1) #:use-module (srfi srfi-1)
#:use-module (srfi srfi-11) #:use-module (srfi srfi-11)
#:use-module (srfi srfi-64) #:use-module (srfi srfi-64)
@ -82,11 +83,10 @@ (define temp-file
("foo" "bar" "baz") ("foo" "bar" "baz")
("foo" "bar" "") ("foo" "bar" "")
("foo" "bar" "baz")) ("foo" "bar" "baz"))
(let ((string-tokenize* (@@ (guix search-paths) string-tokenize*))) (list (string-tokenize* "foo" ":")
(list (string-tokenize* "foo" ":") (string-tokenize* "foo;bar;baz" ";")
(string-tokenize* "foo;bar;baz" ";") (string-tokenize* "foo!bar!" "!")
(string-tokenize* "foo!bar!" "!") (string-tokenize* "foo+-+bar+-+baz" "+-+")))
(string-tokenize* "foo+-+bar+-+baz" "+-+"))))
(test-equal "string-replace-substring" (test-equal "string-replace-substring"
'("foo BAR! baz" '("foo BAR! baz"