diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e81de99..ed46e32 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -39,7 +39,7 @@ jobs: - name: SBCL environment variables if: matrix.lisp == 'sbcl' run: | - echo -e "LISP=sbcl\nLOAD=--load\nEVAL=--eval\nQUIT=--quit" >> $GITHUB_ENV + echo -e "LISP=sbcl --disable-debugger\nLOAD=--load\nEVAL=--eval\nQUIT=--quit" >> $GITHUB_ENV - name: Install Ubuntu dependencies if: matrix.os == 'ubuntu-22.04' @@ -61,7 +61,7 @@ jobs: curl -kLO https://beta.quicklisp.org/quicklisp.lisp $LISP $LOAD quicklisp.lisp $EVAL "(quicklisp-quickstart:install)" $EVAL "(ql-util:without-prompting (ql:add-to-init-file))" $QUIT $LISP $EVAL "(ql:quickload '(:clostrum-basic :clostrum-test))" $QUIT - + - name: Run Regression Tests run: | $LISP $EVAL "(mapc #'asdf:load-system '(:clostrum-basic :clostrum-test))" $EVAL "(clostrum/test:run-tests-exit nil 'clostrum-basic:run-time-environment nil 'clostrum-basic:compilation-environment)" diff --git a/Code/Test/clostrum-test.asd b/Code/Test/clostrum-test.asd index 022d8cf..c4d1d11 100644 --- a/Code/Test/clostrum-test.asd +++ b/Code/Test/clostrum-test.asd @@ -2,7 +2,16 @@ (defsystem "clostrum-test" :description "Test suite for a Clostrum implementation." - :depends-on ("clostrum" "fiveam") + :depends-on ("clostrum" + "clostrum-basic" + "fiveam") :components ((:file "packages") - (:file "tests"))) + (:file "tests")) + :perform (test-op (operation component) + (uiop:symbol-call + '#:clostrum/test '#:run-tests + nil ; client + (find-symbol "RUN-TIME-ENVIRONMENT" (find-package "CLOSTRUM-BASIC")) ; runtime env + nil ; evaluation env + (find-symbol "COMPILATION-ENVIRONMENT" (find-package "CLOSTRUM-BASIC"))))) ; compilation env diff --git a/Code/Test/tests.lisp b/Code/Test/tests.lisp index 188febb..c8c011f 100644 --- a/Code/Test/tests.lisp +++ b/Code/Test/tests.lisp @@ -63,7 +63,7 @@ ;;; on implementations than the cell merely existing and being boundp. (test (call-undefined-function :fixture with-envs) (let* ((fname (make-symbol "F")) - (cell (sys:operator-cell cli renv fname))) + (cell (sys:ensure-operator-cell cli renv fname))) (signals undefined-function (funcall (sys:operator-cell-value cli cell))))) (test (function-binding :fixture with-envs) @@ -223,7 +223,7 @@ (is-false (sys:type-cell-boundp cli (sys:type-cell cli renv cname))))) -(test (make-class :fixture with-envs) +(test (find-class :fixture with-envs) (let ((cname (make-symbol "C")) (class (cl:find-class 'cons))) (finishes (setf (env:find-class cli renv cname) class)) @@ -235,12 +235,12 @@ (signals error (env:find-class cli renv cname)) (is (null (env:find-class cli renv cname nil))))) -(test (make-type :fixture with-envs) +(test (type-expander :fixture with-envs) (let ((tname (make-symbol "T")) (expander (lambda (specifier env) (declare (ignore specifier env)) '(or cons null)))) - (finishes (env:make-type cli renv tname expander)) + (finishes (setf (env:type-expander cli renv tname) expander)) (is (eql expander (env:type-expander cli renv tname))) (is (equal '(or cons null) (env:type-expand-1 cli renv tname))) (is (equal '(or cons null) (env:type-expand-1 cli renv `(,tname)))))) diff --git a/Code/clostrum.asd b/Code/clostrum.asd index 61806d7..e8ad0ef 100644 --- a/Code/clostrum.asd +++ b/Code/clostrum.asd @@ -9,4 +9,5 @@ (:file "clostrum") (:file "default-methods") (:file "conditions") - (:file "documentation"))) + (:file "documentation")) + :in-order-to ((test-op (test-op "clostrum-test")))) diff --git a/README.md b/README.md index e6c123f..6290900 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ The Clostrum API is divided into two parts, a "high level" package `clostrum`, a For operating on run-time environments, the `clostrum` package makes available environment manipulation functions and accessors similar to those in the standard: `fdefinition`, `fboundp`, `fmakunbound`, `macro-function`, `special-operator-p` for functions; `symbol-value`, `boundp`, `makunbound`, `symbol-plist` for variables; `find-class` for classes; `find-package` for packages; and `macroexpand-1`, `macroexpand`, and `constantp`. -There are additional functions and accessors corresponding to some other Lisp operators. `setf-expander` can be used for `define-setf-expander`; `make-variable`, `make-parameter`, `make-constant`, and `make-symbol-macro` for `defvar`, `defparameter`, `defconstant`, and `define-symbol-macro` respectively; and `make-type` and `type-expander` for `deftype`, along with `type-expand-1` and `type-expand` to work with type specifiers. +There are additional functions and accessors corresponding to some other Lisp operators. `setf-expander` can be used for `define-setf-expander`; `make-variable`, `make-parameter`, `make-constant`, and `make-symbol-macro` for `defvar`, `defparameter`, `defconstant`, and `define-symbol-macro` respectively; `type-expander` for `deftype`, along with `type-expand-1` and `type-expand` to work with type specifiers. For proclamations, `proclamation` can be used for `declaration` or CLtL2's `define-declaration`. `variable-type` covers `type`, and `special` proclamations can be done with `make-variable`. `operator-ftype` handles `ftype` and `operator-inline` `inline`. User-defined inlining data, such as a definition, can be associated with an operator through `operator-inline-data`.