Changeset 10039


Ignore:
Timestamp:
09/26/05 11:05:33 (16 years ago)
Author:
piso
Message:

Work in progress.

Location:
trunk/j/src/org/armedbear/lisp/tests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/tests/file-system-tests.lisp

    r10035 r10039  
    3333  (provide "RT"))
    3434
    35 (rt:rem-all-tests)
     35(regression-test:rem-all-tests)
    3636
    3737(let ((*package* (find-package '#:rt)))
    3838  (export (find-symbol (string '#:*expected-failures*))))
    3939
    40 (setf rt:*expected-failures* nil)
     40(setf regression-test:*expected-failures* nil)
    4141
    4242(unless (find-package '#:test)
  • trunk/j/src/org/armedbear/lisp/tests/pathname-tests.lisp

    r10035 r10039  
    22;;;
    33;;; Copyright (C) 2005 Peter Graves
    4 ;;; $Id: pathname-tests.lisp,v 1.27 2005-09-26 01:15:39 piso Exp $
     4;;; $Id: pathname-tests.lisp,v 1.28 2005-09-26 11:02:13 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    3434  (provide "RT"))
    3535
    36 (rt:rem-all-tests)
    37 
    38 (let ((*package* (find-package '#:rt)))
     36(regression-test:rem-all-tests)
     37
     38(let ((*package* (find-package '#:regression-test)))
    3939  (export (find-symbol (string '#:*expected-failures*))))
    4040
    41 (setf rt:*expected-failures* nil)
     41(setf regression-test:*expected-failures* nil)
    4242
    4343(unless (find-package '#:test)
    44   (defpackage #:pathname-tests (:use #:cl #:regression-test
    45                                      #+abcl #:extensions)))
     44  (defpackage #:test (:use #:cl #:regression-test
     45                           #+abcl #:extensions)))
    4646
    4747(in-package #:test)
     
    128128            #-windows ,namestring))
    129129
     130(deftest equal.1
     131  (equal (make-pathname :name "foo" :type "bar")
     132         (make-pathname :name "foo" :type "bar"))
     133  t)
     134
     135(deftest equal.2
     136  (equal (make-pathname :name "foo" :type "bar" :version nil)
     137         (make-pathname :name "foo" :type "bar" :version :newest))
     138  #+(or clisp cmu) nil
     139  #-(or clisp cmu) t)
     140
     141(deftest sxhash.1
     142  (let* ((p (make-pathname :name "foo" :type "bar" :version nil))
     143         (s (sxhash p)))
     144    (values (typep s 'fixnum)
     145            (>= s 0)))
     146  t t)
     147
     148;; "(equal x y) implies (= (sxhash x) (sxhash y))"
     149(deftest sxhash.2
     150  (let ((p1 (make-pathname :name "foo" :type "bar" :version nil))
     151        (p2 (make-pathname :name "foo" :type "bar" :version :newest)))
     152    (if (equal p1 p2)
     153        (= (sxhash p1) (sxhash p2))
     154        t))
     155  t)
     156
     157;; It's suboptimal if all pathnames return the same SXHASH, but that happens
     158;; with CMUCL and SBCL.
     159(deftest sxhash.3
     160  (= (sxhash #p"/usr/local/bin/sbcl") (sxhash #p"") (sxhash #p"foo.bar"))
     161  #+(or cmu sbcl) t
     162  #-(or cmu sbcl) nil)
     163
    130164(deftest physical.1
    131165  (check-physical-pathname #p"/" '(:absolute) nil nil)
     
    206240  t)
    207241#+cmu
    208 (pushnew 'physical.21 rt:*expected-failures*)
     242(pushnew 'physical.21 *expected-failures*)
    209243
    210244;; #p"./"
     
    218252  t)
    219253#+cmu
    220 (pushnew 'physical.22 rt:*expected-failures*)
     254(pushnew 'physical.22 *expected-failures*)
    221255
    222256(deftest physical.23
     
    249283  t)
    250284#+cmu
    251 (pushnew 'physical.25 rt:*expected-failures*)
     285(pushnew 'physical.25 *expected-failures*)
    252286
    253287;; #p"../"
     
    265299  t)
    266300#+cmu
    267 (pushnew 'lots-of-dots.1 rt:*expected-failures*)
     301(pushnew 'lots-of-dots.1 *expected-failures*)
    268302#+(or allegro abcl cmu)
    269303(deftest lots-of-dots.2
     
    271305  t)
    272306#+cmu
    273 (pushnew 'lots-of-dots.2 rt:*expected-failures*)
     307(pushnew 'lots-of-dots.2 *expected-failures*)
    274308
    275309(deftest physical.27
     
    300334  t)
    301335#+cmu
    302 (pushnew 'silly.1 rt:*expected-failures*)
     336(pushnew 'silly.1 *expected-failures*)
    303337
    304338;; If the prefix isn't a defined logical host, it's not a logical pathname.
Note: See TracChangeset for help on using the changeset viewer.