0)
;; Test that stat can take a second argument.
+#-win32
(deftest stat.5
(let* ((stat-1 (sb-posix:stat "/"))
(inode-1 (sb-posix:stat-ino stat-1))
t
t)
+#+win32
+(deftest stat.5
+ (let* ((stat-1 (sb-posix:stat "/"))
+ (mode-1 (sb-posix:stat-mode stat-1))
+ (stat-2 (sb-posix:stat "C:\\CONFIG.SYS"
+ stat-1))
+ (mode-2 (sb-posix:stat-mode stat-2)))
+ (values
+ (eq stat-1 stat-2)
+ (/= mode-1 mode-2)))
+ t
+ t)
+
;;; FIXME: add tests for carrying a stat structure around in the
;;; optional argument to SB-POSIX:STAT
(not (sb-posix:getpwnam "root"))
nil)
+#-win32
+(deftest pwent.non-existing
+ ;; make sure that we get something sensible, not an error
+ (handler-case (progn (sb-posix:getpwnam "almost-certainly-does-not-exist")
+ nil)
+ (t (cond) t))
+ nil)
+
+#-win32
+(deftest grent.1
+ ;; make sure that we found something
+ (not (sb-posix:getgrgid 0))
+ nil)
+
+#-win32
+(deftest grent.2
+ ;; make sure that we found something
+ (not (sb-posix:getgrnam "sys"))
+ nil)
+
+#-win32
+(deftest grent.non-existing
+ ;; make sure that we get something sensible, not an error
+ (handler-case (progn (sb-posix:getgrnam "almost-certainly-does-not-exist")
+ nil)
+ (t (cond) t))
+ nil)
+
#+nil
;; Requires root or special group + plus a sensible thing on the port
(deftest cfget/setispeed.1