user-homedir-pathname.lsp 1.19 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13
;-*- Mode:     Lisp -*-
;;;; Author:   Paul Dietz
;;;; Created:  Sat Dec 11 22:26:24 2004
;;;; Contains: Tests of USER-HOMEDIR-PATHNAME

(in-package :cl-test)

(deftest user-homedir-pathname.1
  (let ((pn (user-homedir-pathname)))
    (notnot pn))
  t)

(deftest user-homedir-pathname.2
14
  (let* ((pn-list (multiple-value-list (user-homedir-pathname)))
sds's avatar
sds committed
15
         (pn (first pn-list)))
16 17 18 19
    (values
     (length pn-list)
     (notnot-mv (pathnamep pn))))
  1 t)
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37

(deftest user-homedir-pathname.3
  (let ((pn (user-homedir-pathname)))
    (pathname-name pn))
  nil)

(deftest user-homedir-pathname.4
  (let ((pn (user-homedir-pathname)))
    (pathname-type pn))
  nil)

(deftest user-homedir-pathname.5
  (let ((pn (user-homedir-pathname)))
    (pathname-version pn))
  nil)

;; (deftest user-homedir-pathname.6
;;  (let* ((pn (user-homedir-pathname))
sds's avatar
sds committed
38
;;       (host (pathname-host pn)))
39
;;    (or (not host)
sds's avatar
sds committed
40
;;      (equalt pn (user-homedir-pathname host))))
41 42 43 44 45
;;  t)

(deftest user-homedir-pathname.7
  (let* ((pn (user-homedir-pathname :unspecific)))
    (or (null pn)
sds's avatar
sds committed
46
        (notnot (pathnamep pn))))
47 48 49 50 51 52
  t)

(deftest user-homedir-pathname.error.1
  (signals-error (user-homedir-pathname :unspecific nil) program-error)
  t)