Ignore:
Timestamp:
Mar 18, 2017, 8:31:56 PM (4 years ago)
Author:
gz
Message:

Add tests for trac tickets 1068 and 1403

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/ansi-tests/ccl.lsp

    r16807 r16811  
    18941894        (with-open-file (f "temp") f t)))
    18951895 t)
     1896(deftest ccl.bug#1068.a
     1897    (let* ((name "a\\*x")
     1898           (name/ "a\\*x/")
     1899           (name/* "a\\*x/*.*")
     1900           (file "a\\*x/temp.dat"))
     1901      (when (probe-file name)
     1902        (if (ccl:directoryp name) (ccl:delete-directory name/) (delete-file name)))
     1903      (ensure-directories-exist name/)
     1904      ;; create a new file
     1905      (close (open file :direction :output :if-exists :error))
     1906      ;; supersede an old file
     1907      (close (open file :direction :output :if-exists :supersede))
     1908      (length (directory "a\\*x/*.*")))
     1909  1)
     1910
     1911(deftest ccl.bug#1068.b
     1912    (pathname-match-p (make-pathname :name "foo;bar") (make-pathname :name "foo;bar"))
     1913  t)
     1914
     1915(deftest ccl.bug#1068.c
     1916    (equal (namestring "a.b.c") "a.b.c")
     1917  t)
    18961918
    18971919(deftest ccl.bug#1103
     
    19731995      (= (aref a 0) (aref a 1)))
    19741996  t)
     1997
     1998(deftest ccl.bug#1403
     1999  (loop for nbits from (1+ (integer-length most-positive-fixnum)) to 80
     2000     for bound = (ash 1 nbits)
     2001     nconc (loop repeat 100 as num = (random bound)
     2002              unless (eql num (read-from-string (princ-to-string num))) collect num))
     2003  nil)
Note: See TracChangeset for help on using the changeset viewer.