Commit 82f6e8e6 authored by pfdietz's avatar pfdietz
Browse files

Added tests for probe-file

parent 099b21ff
......@@ -6,4 +6,5 @@
(in-package :cl-test)
(load "directory.lsp")
(load "probe-file.lsp")
(load "ensure-directories-exist.lsp")
;-*- Mode: Lisp -*-
;;;; Author: Paul Dietz
;;;; Created: Mon Jan 5 20:46:29 2004
;;;; Contains: Tests of PROBE-FILE
(in-package :cl-test)
(deftest probe-file.1
(probe-file #p"nonexistent")
nil)
(deftest probe-file.2
(let ((s (open #p"probe-file.lsp" :direction :input)))
(prog1
(equalp (truename #p"probe-file.lsp")
(probe-file s))
(close s)))
t)
(deftest probe-file.3
(let ((s (open #p"probe-file.lsp" :direction :input)))
(close s)
(equalp (truename #p"probe-file.lsp")
(probe-file s)))
t)
(deftest probe-file.error.1
(classify-error (probe-file))
program-error)
(deftest probe-file.error.2
(classify-error (probe-file #p"probe-file.lsp" nil))
program-error)
(deftest probe-file.error.3
(classify-error (probe-file (make-pathname :name :wild)))
file-error)
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