mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +02:00
test-suite: Canonicalize path in test directory
* test-suite/tests/filesys.test: Canonicalize path in the chdir tests to avoid false differences due to following links.
This commit is contained in:
parent
382d890026
commit
20405089de
1 changed files with 5 additions and 4 deletions
|
@ -423,19 +423,20 @@
|
||||||
(define file (search-path %load-path "ice-9/boot-9.scm"))
|
(define file (search-path %load-path "ice-9/boot-9.scm"))
|
||||||
|
|
||||||
|
|
||||||
(pass-if-equal "test directory" (dirname file)
|
;; canonicalize-path is used to not stumble over differences due to links
|
||||||
|
(pass-if-equal "test directory" (canonicalize-path (dirname file))
|
||||||
(let ((olddir (getcwd))
|
(let ((olddir (getcwd))
|
||||||
(dir #f))
|
(dir #f))
|
||||||
(chdir (dirname file))
|
(chdir (canonicalize-path (dirname file)))
|
||||||
(set! dir (getcwd))
|
(set! dir (getcwd))
|
||||||
(chdir olddir)
|
(chdir olddir)
|
||||||
dir))
|
dir))
|
||||||
|
|
||||||
(pass-if-equal "test directory, via port" (dirname file)
|
(pass-if-equal "test directory, via port" (canonicalize-path (dirname file))
|
||||||
(unless (provided? 'chdir-port)
|
(unless (provided? 'chdir-port)
|
||||||
(throw 'unresolved))
|
(throw 'unresolved))
|
||||||
(let ((olddir (getcwd))
|
(let ((olddir (getcwd))
|
||||||
(port (open (dirname file) O_RDONLY))
|
(port (open (canonicalize-path (dirname file)) O_RDONLY))
|
||||||
(dir #f))
|
(dir #f))
|
||||||
(chdir port)
|
(chdir port)
|
||||||
(set! dir (getcwd))
|
(set! dir (getcwd))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue