Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
asdf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jan Moringen
asdf
Commits
cc87e465
Commit
cc87e465
authored
14 years ago
by
Robert P. Goldman
Browse files
Options
Downloads
Patches
Plain Diff
New test for correct functioning of pathnames on systems and files.
parent
86056c49
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
test/test-system-pathnames.asd
+9
-0
9 additions, 0 deletions
test/test-system-pathnames.asd
test/test-system-pathnames.script
+57
-0
57 additions, 0 deletions
test/test-system-pathnames.script
with
66 additions
and
0 deletions
test/test-system-pathnames.asd
0 → 100644
+
9
−
0
View file @
cc87e465
;;; -*- Lisp -*-
(
defsystem
:test-system-pathnames
:pathname
"sources/level1/"
:components
((
:file
"file1"
)
(
:file
"file2"
:pathname
"level2/file2"
)
(
:static-file
"level2/static.file"
)
(
:static-file
"test-tmp.cl"
)))
This diff is collapsed.
Click to expand it.
test/test-system-pathnames.script
0 → 100644
+
57
−
0
View file @
cc87e465
;;; -*- Lisp -*-
(load "script-support")
(load-asdf)
(quit-on-error
(setf asdf:*central-registry* '(*default-pathname-defaults*))
(trace asdf:perform)
(asdf:load-system 'test-system-pathnames)
(flet ((submodule (module name)
(find name (asdf:module-components module)
:key #'asdf:component-name :test #'equal))
(pathname-foo (x)
(list (pathname-directory x) (pathname-name x) (pathname-type x))))
(let* ((system (asdf:find-system "test-module-pathnames"))
(level1 (submodule system "sources/level1"))
(static (submodule level1 "level2/static.file"))
(test-tmp (submodule level1 "test-tmp.cl")))
(assert (member (pathname-foo (asdf:component-relative-pathname test-tmp))
'(((:relative) "test-tmp" "cl")
(nil "test-tmp" "cl")) :test 'equal)
() "Didn't get the name of test-tmp.cl right")
(assert (equal
(pathname-foo (asdf:component-relative-pathname static))
'((:relative "level2") "static" "file"))
() "Didn't get the name of static.file right")))
(assert (find-package :test-package)
() "package test-package not found")
(assert (find-symbol (symbol-name '*file-tmp*) :test-package)
() "symbol `*file-tmp*` not found")
(assert (symbol-value (find-symbol (symbol-name '*file-tmp*) :test-package))
() "symbol `*file-tmp*` has wrong value")
#| ; must be adapted to ABL
(assert (probe-file (merge-pathnames
(make-pathname
:name "file1"
:type (pathname-type (compile-file-pathname "x"))
:directory '(:relative "sources" "level1"))))
nil "compiled file not found")
|#
(assert (find-symbol (symbol-name '*file-tmp2*) :test-package) nil
"symbol `*file-tmp2*` not found")
(assert (symbol-value (find-symbol (symbol-name '*file-tmp2*) :test-package))
nil "symbol `*file-tmp2*` has wrong value")
#| ; must be adapted to ABL
(assert (probe-file (merge-pathnames
(make-pathname
:name "file2"
:type (pathname-type (compile-file-pathname "x"))
:directory '(:relative "sources" "level1" "level2"))))
nil "compiled file not found")
|#
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment