source: trunk/source/tests/ansi-tests/print-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: 964 bytes
Line 
1;-*- Mode:     Lisp -*-
2;;;; Author:   Paul Dietz
3;;;; Created:  Tue May 25 08:22:03 2004
4;;;; Contains: Printer tests for pathnames
5
6(in-package :cl-test)
7
8(compile-and-load "printer-aux.lsp")
9
10(deftest print.pathname.1
11  (loop for p in *universe*
12        when (typep p 'pathname)
13        nconc
14        (loop repeat 10
15              nconc (randomly-check-readability p :test #'is-similar
16                                                :can-fail t)))
17  nil)
18
19(deftest print.pathname.2
20  (loop for p in *universe*
21        when (typep p 'pathname)
22        nconc
23        (let ((ns (ignore-errors (namestring p))))
24          "Read 22.1.3.11 before commenting on this test"
25          (when ns
26            (let ((expected-result
27                   (concatenate 'string "#P"
28                                (with-standard-io-syntax
29                                 (write-to-string ns :readably nil
30                                                  :escape t))))
31                  (result (with-standard-io-syntax
32                           (write-to-string p :readably nil :escape t))))
33              (unless (string= expected-result result)
34                (list (list expected-result result)))))))
35  nil)
Note: See TracBrowser for help on using the repository browser.