Commit e6f016aa authored by Daniel Kochmański's avatar Daniel Kochmański
Browse files

makefile: run tests in sandbox/ directory


Signed-off-by: Daniel Kochmański's avatarDaniel Kochmański <daniel@turtleware.eu>
parent e93ee420
......@@ -11,7 +11,7 @@
(deftest file-length.error.2
(signals-error
(with-open-file (is "sample-files/file-length.txt" :direction :input)
(with-open-file (is "file-length.txt" :direction :input)
(file-length is nil))
program-error)
t)
......@@ -37,7 +37,7 @@
(deftest file-length.error.5
(signals-error
(with-open-file
(is "sample-files/file-length.txt" :direction :input)
(is "file-length.txt" :direction :input)
(with-open-file
(os "tmp.txt" :direction :output :if-exists :supersede)
(let ((s (make-two-way-stream is os)))
......@@ -48,7 +48,7 @@
(deftest file-length.error.6
(signals-error
(with-open-file
(is "sample-files/file-length.txt" :direction :input)
(is "file-length.txt" :direction :input)
(with-open-file
(os "tmp.txt" :direction :output :if-exists :supersede)
(let ((s (make-echo-stream is os)))
......@@ -71,7 +71,7 @@
(deftest file-length.error.10
(signals-error
(with-open-file
(is "sample-files/file-length.txt" :direction :input)
(is "file-length.txt" :direction :input)
(let ((s (make-concatenated-stream is)))
(unwind-protect (file-length s) (close s))))
type-error)
......@@ -94,7 +94,7 @@
(deftest file-length.1
(let ((results (multiple-value-list
(with-open-file
(is "sample-files/file-length.txt" :direction :input)
(is "file-length.txt" :direction :input)
(file-length is)))))
(and (= (length results) 1)
(typep (car results) '(integer 1))
......@@ -167,7 +167,7 @@
(deftest file-length.6
(with-open-file
(*foo* "sample-files/file-length.txt" :direction :input)
(*foo* "file-length.txt" :direction :input)
(declare (special *foo*))
(let ((s (make-synonym-stream '*foo*)))
(unwind-protect
......
......@@ -6,12 +6,12 @@
(in-package :cl-test)
(deftest file-position.1
(with-open-file (is "sample-files/file-position.txt":direction :input)
(with-open-file (is "file-position.txt":direction :input)
(file-position is))
0)
(deftest file-position.2
(with-open-file (is "sample-files/file-position.txt":direction :input)
(with-open-file (is "file-position.txt":direction :input)
(values
(multiple-value-list
(notnot-mv (file-position is :start)))
......@@ -20,7 +20,7 @@
(t) 0)
(deftest file-position.3
(with-open-file (is "sample-files/file-position.txt":direction :input)
(with-open-file (is "file-position.txt":direction :input)
(values
(multiple-value-list
(notnot-mv (file-position is :end)))
......@@ -29,7 +29,7 @@
(deftest file-position.4
(with-open-file
(is "sample-files/file-position.txt":direction :input)
(is "file-position.txt":direction :input)
(values
(file-position is)
(read-char is)
......@@ -149,7 +149,7 @@
(deftest file-position.error.3
(signals-error
(with-open-file
(is "sample-files/file-position.txt" :direction :input)
(is "file-position.txt" :direction :input)
(flet ((%fail () (error 'type-error)))
(unless (file-position is :end) (%fail))
(let ((fp (file-position is)))
......@@ -161,7 +161,7 @@
(deftest file-position.error.4
(signals-error
(with-open-file
(is "sample-files/file-position.txt" :direction :input)
(is "file-position.txt" :direction :input)
(file-position is 1000000000000000000000))
error)
t)
......
......@@ -14,7 +14,7 @@
t)
(deftest input-stream-p.3
(with-open-file (s "sample-files/input-stream-p.txt" :direction :input)
(with-open-file (s "input-stream-p.txt" :direction :input)
(notnot-mv (input-stream-p s)))
t)
......
......@@ -39,7 +39,7 @@
(deftest listen.7
(with-open-file
(s "sample-files/listen.txt")
(s "listen.txt")
(values
(notnot (listen s))
(handler-case
......
......@@ -16,7 +16,7 @@
nil)
(deftest open-stream-p.2
(with-open-file (s "sample-files/open-stream-p.txt" :direction :input)
(with-open-file (s "open-stream-p.txt" :direction :input)
(notnot-mv (open-stream-p s)))
t)
......@@ -27,7 +27,7 @@
t)
(deftest open-stream-p.4
(let ((s (open "sample-files/open-stream-p.txt" :direction :input)))
(let ((s (open "open-stream-p.txt" :direction :input)))
(close s)
(open-stream-p s))
nil)
......
......@@ -14,7 +14,7 @@
t)
(deftest output-stream-p.3
(with-open-file (s "sample-files/output-stream-p.txt" :direction :input)
(with-open-file (s "output-stream-p.txt" :direction :input)
(output-stream-p s))
nil)
......
......@@ -64,86 +64,86 @@
(funcall funname)))))))
(deftest compile-file.1
(compile-file-test "sample-files/compile-file-test-file.lsp"
(compile-file-test "compile-file-test-file.lsp"
'compile-file-test-fun.1) t nil)
(deftest compile-file.2
(compile-file-test "sample-files/compile-file-test-file-2.lsp"
(compile-file-test "compile-file-test-file-2.lsp"
'compile-file-test-fun.2
:expect-style-warnings t)
t nil)
(deftest compile-file.2a
(compile-file-test "sample-files/compile-file-test-file-2a.lsp"
(compile-file-test "compile-file-test-file-2a.lsp"
'compile-file-test-fun.2a
:expect-warnings t)
t nil)
(deftest compile-file.3
(let ((*package* (find-package "CL-TEST")))
(compile-file-test "sample-files/compile-file-test-file-3.lsp"
(compile-file-test "compile-file-test-file-3.lsp"
'compile-file-test-fun.3)) t nil)
(deftest compile-file.4
(let ((*package* (find-package "CL-USER")))
(compile-file-test "sample-files/compile-file-test-file-3.lsp"
(compile-file-test "compile-file-test-file-3.lsp"
'cl-user::compile-file-test-fun.3)) t nil)
(deftest compile-file.5
(compile-file-test #p"sample-files/compile-file-test-file.lsp"
(compile-file-test #p"compile-file-test-file.lsp"
'compile-file-test-fun.1) t nil)
(deftest compile-file.6
(compile-file-test "sample-files/compile-file-test-file.lsp"
(compile-file-test "compile-file-test-file.lsp"
'compile-file-test-fun.1
:output-file "foo.fasl")
t nil)
(deftest compile-file.6a
(compile-file-test "sample-files/compile-file-test-file.lsp"
(compile-file-test "compile-file-test-file.lsp"
'compile-file-test-fun.1
:output-file "foo.ufsl")
t nil)
(deftest compile-file.7
(compile-file-test "sample-files/compile-file-test-file.lsp"
(compile-file-test "compile-file-test-file.lsp"
'compile-file-test-fun.1
:external-format :default)
t nil)
(deftest compile-file.8
(compile-file-test "sample-files/compile-file-test-file.lsp"
(compile-file-test "compile-file-test-file.lsp"
'compile-file-test-fun.1
:output-file #p"foo.fasl")
t nil)
(deftest compile-file.9
(compile-file-test "sample-files/compile-file-test-file.lsp"
(compile-file-test "compile-file-test-file.lsp"
'compile-file-test-fun.1
:print t)
t nil)
(deftest compile-file.10
(compile-file-test "sample-files/compile-file-test-file.lsp"
(compile-file-test "compile-file-test-file.lsp"
'compile-file-test-fun.1
:verbose t)
t nil)
(deftest compile-file.11
(compile-file-test "sample-files/compile-file-test-file.lsp"
(compile-file-test "compile-file-test-file.lsp"
'compile-file-test-fun.1
:print nil)
t nil)
(deftest compile-file.12
(compile-file-test "sample-files/compile-file-test-file.lsp"
(compile-file-test "compile-file-test-file.lsp"
'compile-file-test-fun.1
:verbose nil)
t nil)
;;; A file stream is a pathname designator
(deftest compile-file.13
(with-open-file (s "sample-files/compile-file-test-file.lsp" :direction :input)
(with-open-file (s "compile-file-test-file.lsp" :direction :input)
(compile-file-test s 'compile-file-test-fun.1))
t nil)
......@@ -151,7 +151,7 @@
(let ((s (open "foo.fasl" :direction :output :if-exists :supersede
:if-does-not-exist :create)))
(close s)
(compile-file-test "sample-files/compile-file-test-file.lsp"
(compile-file-test "compile-file-test-file.lsp"
'compile-file-test-fun.1
:output-file s))
t nil)
......@@ -159,13 +159,13 @@
(deftest compile-file.15
(let ((*readtable* (copy-readtable nil)))
(set-macro-character #\! (get-macro-character #\'))
(compile-file-test "sample-files/compile-file-test-file-4.lsp"
(compile-file-test "compile-file-test-file-4.lsp"
'compile-file-test-fun.4)) t foo)
;;; Tests for *compile-file-truename*, *compile-file-pathname*
(deftest compile-file.16
(let* ((file #p"sample-files/compile-file-test-file-5.lsp")
(let* ((file #p"compile-file-test-file-5.lsp")
(target-pathname (compile-file-pathname file))
(*compile-print* nil)
(*compile-verbose* nil))
......@@ -193,19 +193,19 @@
(let ((file (logical-pathname "CLTEST:COMPILE-FILE-TEST-LP.OUT")))
(with-open-file
(s file :direction :output :if-exists :supersede :if-does-not-exist :create))
(compile-file-test "sample-files/compile-file-test-file.lsp"
(compile-file-test "compile-file-test-file.lsp"
'compile-file-test-fun.1
:output-file file))
t nil)
(deftest compile-file.19
(compile-file-test "sample-files/compile-file-test-file.lsp"
(compile-file-test "compile-file-test-file.lsp"
'compile-file-test-fun.1
:*compile-verbose* t)
t nil)
(deftest compile-file.20
(compile-file-test "sample-files/compile-file-test-file.lsp"
(compile-file-test "compile-file-test-file.lsp"
'compile-file-test-fun.1
:*compile-print* t)
t nil)
......@@ -221,7 +221,7 @@
;;; Error cases
(deftest compile-file.error.1
(signals-error (compile-file "sample-files/nonexistent-file-to-compile.lsp")
(signals-error (compile-file "nonexistent-file-to-compile.lsp")
file-error) t)
(deftest compile-file.error.2
......
......@@ -36,11 +36,11 @@
(funcall funname))))
(deftest load.1
(load-file-test "sample-files/compile-file-test-file.lsp"
(load-file-test "compile-file-test-file.lsp"
'compile-file-test-fun.1) t nil)
(deftest load.2
(load-file-test #p"sample-files/compile-file-test-file.lsp"
(load-file-test #p"compile-file-test-file.lsp"
'compile-file-test-fun.1) t nil)
(deftest load.3
......@@ -50,25 +50,25 @@
t good)
(deftest load.4
(load-file-test "sample-files/compile-file-test-file.lsp"
(load-file-test "compile-file-test-file.lsp"
'compile-file-test-fun.1
:external-format :default)
t nil)
(deftest load.5
(load-file-test "sample-files/compile-file-test-file.lsp"
(load-file-test "compile-file-test-file.lsp"
'compile-file-test-fun.1
:verbose t)
t nil)
(deftest load.6
(load-file-test "sample-files/compile-file-test-file.lsp"
(load-file-test "compile-file-test-file.lsp"
'compile-file-test-fun.1
:*load-verbose* t)
t nil)
(deftest load.7
(load-file-test "sample-files/compile-file-test-file.lsp"
(load-file-test "compile-file-test-file.lsp"
'compile-file-test-fun.1
:*load-verbose* t :verbose nil)
t nil)
......@@ -80,25 +80,25 @@
t good)
(deftest load.9
(load-file-test "sample-files/compile-file-test-file.lsp"
(load-file-test "compile-file-test-file.lsp"
'compile-file-test-fun.1
:print t)
t nil)
(deftest load.10
(load-file-test "sample-files/compile-file-test-file.lsp"
(load-file-test "compile-file-test-file.lsp"
'compile-file-test-fun.1
:*load-print* t)
t nil)
(deftest load.11
(load-file-test "sample-files/compile-file-test-file.lsp"
(load-file-test "compile-file-test-file.lsp"
'compile-file-test-fun.1
:*load-print* t :print nil)
t nil)
(deftest load.12
(load-file-test "sample-files/compile-file-test-file.lsp"
(load-file-test "compile-file-test-file.lsp"
'compile-file-test-fun.1
:*load-print* nil :print t)
t nil)
......@@ -110,7 +110,7 @@
t good)
(deftest load.14
(load "sample-files/nonexistent-file.lsp" :if-does-not-exist nil)
(load "nonexistent-file.lsp" :if-does-not-exist nil)
nil)
(defpackage LOAD-TEST-PACKAGE (:use "COMMON-LISP"))
......@@ -156,7 +156,7 @@
(t good) !FOO)
(deftest load.17
(let ((file #p"sample-files/load-test-file.lsp"))
(let ((file #p"load-test-file.lsp"))
(fmakunbound 'load-file-test-fun.1)
(fmakunbound 'load-file-test-fun.2)
(values
......@@ -173,7 +173,7 @@
;;; properly when loading compiled files
(deftest load.18
(let* ((file "sample-files/load-test-file-2.lsp")
(let* ((file "load-test-file-2.lsp")
(target (enough-namestring (compile-file-pathname file))))
(declare (special *load-test-var.1* *load-test-var.2*))
(compile-file file)
......@@ -220,7 +220,7 @@
;;; Error tests
(deftest load.error.1
(signals-error (load "sample-files/nonexistent-file.lsp")
(signals-error (load "nonexistent-file.lsp")
file-error) t)
(deftest load.error.2
......@@ -228,5 +228,5 @@
t)
(deftest load.error.3
(signals-error (load "sample-files/compile-file-test-file.lsp" :bad-key-arg
(signals-error (load "compile-file-test-file.lsp" :bad-key-arg
t) program-error) t)
......@@ -44,7 +44,7 @@
(let ((*modules* *modules*)
(fn 'modules7-fun))
(when (fboundp fn) (fmakunbound fn))
(require "MODULES-7" #p"sample-files/modules7.lsp")
(require "MODULES-7" #p"modules7.lsp")
(funcall fn))
:good)
......@@ -53,8 +53,8 @@
(fns '(modules8a-fun modules8b-fun)))
(dolist (fn fns)
(when (fboundp fn) (fmakunbound fn)))
(require "MODULES-8" '(#p"sample-files/modules8a.lsp"
#p"sample-files/modules8b.lsp"))
(require "MODULES-8" '(#p"modules8a.lsp"
#p"modules8b.lsp"))
(mapcar #'funcall fns))
(:good :also-good))
......
......@@ -97,7 +97,7 @@
(make-echo-stream (make-string-input-stream "foo") out))
(echo-stream stream t))
(def-cpl-test (open "sample-files/class-precedence-lists.txt" :direction :probe)
(def-cpl-test (open "class-precedence-lists.txt" :direction :probe)
(file-stream stream t))
(def-cpl-test 1.0s0 (float real number t) float-cpl.1)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment