mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-22 04:30:19 +02:00
tests: Improve lack-of-/dev/null detection.
Suggested by Eli Zaretskii <eliz@gnu.org>. * test-suite/test-suite/lib.scm (%null-device): Test for Windows based by checking for a drive letter in the current directory name.
This commit is contained in:
parent
700f6cd86b
commit
f089330846
1 changed files with 6 additions and 3 deletions
|
@ -578,9 +578,12 @@
|
||||||
;; On Windows (MinGW), /dev/null does not exist and we must instead
|
;; On Windows (MinGW), /dev/null does not exist and we must instead
|
||||||
;; use NUL. Note that file system procedures automatically translate
|
;; use NUL. Note that file system procedures automatically translate
|
||||||
;; /dev/null, so this variable is only useful for shell snippets.
|
;; /dev/null, so this variable is only useful for shell snippets.
|
||||||
(if (file-exists? "/dev/null")
|
|
||||||
"/dev/null"
|
;; Test for Windowsness by checking whether the current directory name
|
||||||
"NUL"))
|
;; starts with a drive letter.
|
||||||
|
(if (string-match "^[a-zA-Z]:[/\\]" (getcwd))
|
||||||
|
"NUL"
|
||||||
|
"/dev/null"))
|
||||||
|
|
||||||
|
|
||||||
;;;; REPORTERS
|
;;;; REPORTERS
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue