From b990a45283077a5867b67f90338b2215b3b19379 Mon Sep 17 00:00:00 2001 From: David Lichteblau Date: Wed, 10 Aug 2011 14:58:21 +0200 Subject: [PATCH] sb-posix: in win32 tests, avoid certain hardcoded file names stat.5: Create a fresh file instead of hardcoding c:\pagefile.sys (was c:\config.sys until recently; was /bin/sh originally). rmdir.error.3: Use %windir% instead of c:\. Tests now pass with Wine on my system without local workarounds. --- contrib/sb-posix/posix-tests.lisp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/contrib/sb-posix/posix-tests.lisp b/contrib/sb-posix/posix-tests.lisp index 0eec378..b035e65 100644 --- a/contrib/sb-posix/posix-tests.lisp +++ b/contrib/sb-posix/posix-tests.lisp @@ -169,7 +169,7 @@ (deftest rmdir.error.3 (handler-case - (sb-posix:rmdir #-win32 "/" #+win32 "C:/") + (sb-posix:rmdir #-win32 "/" #+win32 (sb-ext:posix-getenv "windir")) (sb-posix:syscall-error (c) (typep (sb-posix:syscall-errno c) @@ -280,14 +280,15 @@ #+win32 (deftest stat.5 - (let* ((stat-1 (sb-posix:stat "/")) - (mode-1 (sb-posix:stat-mode stat-1)) - (stat-2 (sb-posix:stat "C:\\pagefile.sys" - stat-1)) - (mode-2 (sb-posix:stat-mode stat-2))) - (values - (eq stat-1 stat-2) - (/= mode-1 mode-2))) + (let ((f (namestring (merge-pathnames "some.file" *test-directory*)))) + (close (open f :if-exists :append :if-does-not-exist :create)) + (let* ((stat-1 (sb-posix:stat "/")) + (mode-1 (sb-posix:stat-mode stat-1)) + (stat-2 (sb-posix:stat f stat-1)) + (mode-2 (sb-posix:stat-mode stat-2))) + (values + (eq stat-1 stat-2) + (/= mode-1 mode-2)))) t t) -- 1.7.10.4