mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-18 21:46:35 +01:00
gexp: Add 'local-file' file name resolution test.
* tests/gexp.scm ("local-file, relative file name"): New test.
This commit is contained in:
parent
0687fc9cd9
commit
4ff76a0a34
1 changed files with 9 additions and 0 deletions
|
@ -24,6 +24,7 @@ (define-module (test-gexp)
|
|||
#:use-module (guix derivations)
|
||||
#:use-module (guix packages)
|
||||
#:use-module (guix tests)
|
||||
#:use-module ((guix build utils) #:select (with-directory-excursion))
|
||||
#:use-module (gnu packages)
|
||||
#:use-module (gnu packages base)
|
||||
#:use-module (gnu packages bootstrap)
|
||||
|
@ -133,6 +134,14 @@ (define-syntax-rule (test-assertm name exp)
|
|||
(lambda ()
|
||||
(false-if-exception (delete-file link))))))
|
||||
|
||||
(test-equal "local-file, relative file name"
|
||||
(canonicalize-path (search-path %load-path "guix/base32.scm"))
|
||||
(let ((directory (dirname (search-path %load-path
|
||||
"guix/build-system/gnu.scm"))))
|
||||
(with-directory-excursion directory
|
||||
(let ((file (local-file "../guix/base32.scm")))
|
||||
(local-file-absolute-file-name file)))))
|
||||
|
||||
(test-assertm "local-file, #:select?"
|
||||
(mlet* %store-monad ((select? -> (lambda (file stat)
|
||||
(member (basename file)
|
||||
|
|
Loading…
Reference in a new issue