Commit be192ffa authored by pfdietz's avatar pfdietz

Begin adding logical pathname tests.

parent 5b893d0c
......@@ -17,3 +17,4 @@
(load "pathname-type.lsp")
(load "pathname-version.lsp")
(load "translate-logical-pathname.lsp")
;-*- Mode: Lisp -*-
;;;; Author: Paul Dietz
;;;; Created: Mon Dec 29 14:45:50 2003
;;;; Contains: Tests for TRANSLATE-LOGICAL-PATHNAME
(in-package :cl-test)
;; On physical pathnames, t-l-p returns the pathname itself
;;; Every physical pathname is converted to itself
(deftest translate-logical-pathname.1
(loop for p in *pathnames*
unless (or (typep p 'logical-pathname)
(eq p (translate-logical-pathname p)))
collect p)
nil)
;;; &key arguments are allowed
(deftest translate-logical-pathname.2
(loop for p in *pathnames*
unless (or (typep p 'logical-pathname)
(eq p (translate-logical-pathname
p :allow-other-keys t)))
collect p)
nil)
(deftest translate-logical-pathname.3
(loop for p in *pathnames*
unless (or (typep p 'logical-pathname)
(eq p (translate-logical-pathname
p :allow-other-keys nil)))
collect p)
nil)
(deftest translate-logical-pathname.4
(loop for p in *pathnames*
unless (or (typep p 'logical-pathname)
(eq p (translate-logical-pathname
p :foo 1 :allow-other-keys t :bar 2)))
collect p)
nil)
;;; errors
(deftest translate-logical-pathname.error.1
(classify-error (translate-logical-pathname))
program-error)
......@@ -336,6 +336,15 @@
(ignore-errors (list (make-pathname :version :newest)))
))
(eval-when (load eval compile)
(setf (logical-pathname-translations "CLTESTROOT")
`(("**;*.*.*" ,(make-pathname :directory '(:absolute))))))
(defparameter *logical-pathnames*
(append
(ignore-errors (list (logical-pathname "CLTESTROOT:")))
))
(defparameter *streams*
(remove-duplicates
(remove-if
......@@ -406,6 +415,7 @@
*arrays*
*hash-tables*
*pathnames*
*logical-pathnames*
*streams*
*readtables*
*structures*
......@@ -428,6 +438,7 @@
*arrays*
*hash-tables*
*pathnames*
*logical-pathnames*
*streams*
*readtables*
*structures*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment