Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
asdf
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Pascal J. Bourguignon
asdf
Commits
9575fb8d
Commit
9575fb8d
authored
Oct 31, 2014
by
Francois-Rene Rideau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the undefined-variables test more portable.
parent
02281587
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
20 deletions
+15
-20
test/script-support.lisp
test/script-support.lisp
+5
-1
test/test-deferred-warnings.script
test/test-deferred-warnings.script
+10
-19
No files found.
test/script-support.lisp
View file @
9575fb8d
...
...
@@ -127,7 +127,11 @@ Some constraints:
',sexp
',condition
,
x
))
(
t
(
,
x
)
(
error
"Expression ~S raises signal ~S, not ~S"
',sexp
,
x
',condition
)))))
(
defmacro
errors
(
condition
sexp
)
`
(
progn
(
format
*error-output*
"~&Checking whether ~S signals error ~S~%"
',sexp
',condition
)
(
finish-output
*error-output*
)
(
assert-equal
',condition
(
type-of
(
nth-value
1
(
ignore-errors
,
sexp
))))))
;;; Helpful for debugging
(
defun
pathname-components
(
p
)
...
...
test/test-deferred-warnings.script
View file @
9575fb8d
...
...
@@ -98,22 +98,13 @@
;;(t (c) (DBG :ustdf0 c))
(:no-error (&rest values) (DBG :ustdf1 values) nil)))
(assert
(flet ((expected-error (x)
(format t "Expected error type: ~a" (type-of x))
t))
(handler-case
(let ((*compile-file-warnings-behaviour* :error))
(load-system :undefined-variables)
nil)
(compile-failed-error (x) (expected-error x))
(compile-file-error (x) (expected-error x))
(error (x)
(format t "Unexpected error type: ~a" (type-of x))
nil))))
(assert
(handler-case
(let ((*compile-file-warnings-behaviour* :warning))
(load-system :undefined-variables :force t)
nil)
(error () t)))
(errors #+(or allegro clozure) compile-file-error
#+(or cmu scl) null
#+sbcl compile-failed-error
(let ((*compile-file-warnings-behaviour* :error))
(load-system :undefined-variables)))
(errors #+(or allegro clozure) compile-file-error
#+(or cmu scl) null
#+sbcl compile-failed-error
(let ((*compile-file-warnings-behaviour* :warning))
(load-system :undefined-variables :force t)))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment