source: trunk/source/tests/ansi-tests/translate-logical-pathname.lsp @ 8991

Last change on this file since 8991 was 8991, checked in by gz, 11 years ago

Check in the gcl ansi test suite (original, in preparation for making local changes)

File size: 1.2 KB
Line 
1;-*- Mode:     Lisp -*-
2;;;; Author:   Paul Dietz
3;;;; Created:  Mon Dec 29 14:45:50 2003
4;;;; Contains: Tests for TRANSLATE-LOGICAL-PATHNAME
5
6(in-package :cl-test)
7
8;; On physical pathnames, t-l-p returns the pathname itself
9
10;;; Every physical pathname is converted to itself
11(deftest translate-logical-pathname.1
12  (loop for p in *pathnames*
13        unless (or (typep p 'logical-pathname)
14                   (eq p (translate-logical-pathname p)))
15        collect p)
16  nil)
17
18;;; &key arguments are allowed
19(deftest translate-logical-pathname.2
20  (loop for p in *pathnames*
21        unless (or (typep p 'logical-pathname)
22                   (eq p (translate-logical-pathname
23                          p :allow-other-keys t)))
24        collect p)
25  nil)
26
27(deftest translate-logical-pathname.3
28  (loop for p in *pathnames*
29        unless (or (typep p 'logical-pathname)
30                   (eq p (translate-logical-pathname
31                          p :allow-other-keys nil)))
32        collect p)
33  nil)
34
35(deftest translate-logical-pathname.4
36  (loop for p in *pathnames*
37        unless (or (typep p 'logical-pathname)
38                   (eq p (translate-logical-pathname
39                          p :foo 1 :allow-other-keys t :bar 2)))
40        collect p)
41  nil)
42
43
44;;; errors
45
46(deftest translate-logical-pathname.error.1
47  (signals-error (translate-logical-pathname) program-error)
48  t)
Note: See TracBrowser for help on using the repository browser.