source: trunk/source/tests/ansi-tests/host-namestring.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.1 KB
Line 
1;-*- Mode:     Lisp -*-
2;;;; Author:   Paul Dietz
3;;;; Created:  Sun Sep 12 06:22:40 2004
4;;;; Contains: Tests of HOST-NAMESTRING
5
6(in-package :cl-test)
7
8(deftest host-namestring.1
9  (let* ((vals (multiple-value-list
10                (host-namestring "host-namestring.lsp")))
11         (s (first vals)))
12    (if (and (null (cdr vals))
13             (or (null s)
14                 (stringp s)
15                 ;; (equal (host-namestring s) s)
16                 ))
17        :good
18      vals))
19  :good)
20
21(deftest host-namestring.2
22  (do-special-strings
23   (s "host-namestring.lsp" nil)
24   (let ((ns (host-namestring s)))
25     (when ns
26       (assert (stringp ns))
27       ;; (assert (string= (host-namestring ns) ns))
28       )))
29  nil)
30
31(deftest host-namestring.3
32  (let* ((name "host-namestring.lsp")
33         (pn (merge-pathnames (pathname name)))
34         (name2 (with-open-file (s pn :direction :input)
35                                (host-namestring s)))
36         (name3 (host-namestring pn)))
37    (or (equalt name2 name3) (list name2 name3)))
38  t)
39
40;;; Error tests
41
42(deftest host-namestring.error.1
43  (signals-error (host-namestring) program-error)
44  t)
45
46(deftest host-namestring.error.2
47  (signals-error (host-namestring "host-namestring.lsp" nil) program-error)
48  t)
49
Note: See TracBrowser for help on using the repository browser.