[osicat-cvs] CVS update: src/osicat.lisp src/test-osicat.lisp

Julian E. C. Squires jsquires at common-lisp.net
Sat Apr 24 16:40:05 UTC 2004


Update of /project/osicat/cvsroot/src
In directory common-lisp.net:/tmp/cvs-serv30849

Modified Files:
	osicat.lisp test-osicat.lisp 
Log Message:
Fixed a dumb USER-INFO typo.
Fixed environment.3 test (#.(environment) of course can end up with a
value different from (environment)).
Removed extraneous fixednam flet.

Date: Sat Apr 24 12:40:03 2004
Author: jsquires

Index: src/osicat.lisp
diff -u src/osicat.lisp:1.19 src/osicat.lisp:1.20
--- src/osicat.lisp:1.19	Thu Apr 22 20:01:20 2004
+++ src/osicat.lisp	Sat Apr 24 12:40:02 2004
@@ -101,15 +101,9 @@
      :defaults pathspec)))
 
 (defun normpath (pathspec &optional absolute)
-  (flet ((fixedname (path)
-	   (let ((name (pathname-name path)))
-	     (cond ((equal ".." name) :up)
-		   ((equal "." name) nil)
-		   ((stringp name) name))))
-	 (fixeddir (path)
-	   (let ((dir (pathname-directory (concatenate 'string
-						       (namestring path)
-						       "/"))))
+  (flet ((fixeddir (path)
+	   (let ((dir (pathname-directory
+		       (concatenate 'string (namestring path) "/"))))
 	     (if (member (car dir) '(:absolute :relative))
 		 dir
 		 (cons :relative dir)))))
@@ -407,7 +401,7 @@
 function USER-INFO user-id => alist
 
 USER-INFO returns the password entry for the given name or numerical
-user ID, as an alist."
+user ID, as an assoc-list."
   (let ((pwent (typecase id
 		 (string (with-cstring (name id) (getpwnam name)))
 		 (integer (getpwuid id))
@@ -416,6 +410,6 @@
       (list (cons :name (osicat-pwent-name pwent))
 	    (cons :user-id (osicat-pwent-uid pwent))
 	    (cons :group-id (osicat-pwent-gid pwent))
-	    (cons :gecos (osicat-pwent-gid pwent))
+	    (cons :gecos (osicat-pwent-gecos pwent))
 	    (cons :home (osicat-pwent-home pwent))
 	    (cons :shell (osicat-pwent-shell pwent))))))


Index: src/test-osicat.lisp
diff -u src/test-osicat.lisp:1.7 src/test-osicat.lisp:1.8
--- src/test-osicat.lisp:1.7	Thu Apr 22 20:01:20 2004
+++ src/test-osicat.lisp	Sat Apr 24 12:40:02 2004
@@ -63,10 +63,12 @@
       (makunbound-environment-variable 'test-variable))
   ("TEST-VARIABLE" . "TEST-VALUE"))
 
+;; No-op test to ensure setf environment actually works.
 (deftest environment.3
-    ;; No-op test to ensure setf environment actually works.
-    (setf (environment) (environment))
-  #.(environment))
+    (let ((old-env (environment)))
+      (prog1 (setf (environment) nil)
+	(setf (environment) old-env)))
+  nil)
 
 (deftest environment-variable.1
     (environment-variable 'test-variable)





More information about the Osicat-cvs mailing list