Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
cmucl
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
Package Registry
Model registry
Operate
Environments
Terraform modules
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
Carl Shapiro
cmucl
Commits
3665075a
Commit
3665075a
authored
7 years ago
by
Raymond Toy
Browse files
Options
Downloads
Patches
Plain Diff
Add test for issue #45
Add the tests given in issue #45.
parent
12018284
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
bin/run-tests.sh
+6
-0
6 additions, 0 deletions
bin/run-tests.sh
tests/issues.lisp
+30
-0
30 additions, 0 deletions
tests/issues.lisp
with
36 additions
and
0 deletions
bin/run-tests.sh
+
6
−
0
View file @
3665075a
...
@@ -34,6 +34,12 @@ done
...
@@ -34,6 +34,12 @@ done
# Shift out the options
# Shift out the options
shift
$[$OPTIND
- 1]
shift
$[$OPTIND
- 1]
# Create the test directory needed issue.45 test.
rm
-rf
test-tmp
mkdir
test-tmp
ln
-s
/bin/ls test-tmp/ls-link
if
[
$#
-eq
0
]
;
then
if
[
$#
-eq
0
]
;
then
# No args so run all the tests
# No args so run all the tests
$LISP
-noinit
-load
tests/run-tests.lisp
-eval
'(cmucl-test-runner:run-all-tests)'
$LISP
-noinit
-load
tests/run-tests.lisp
-eval
'(cmucl-test-runner:run-all-tests)'
...
...
This diff is collapsed.
Click to expand it.
tests/issues.lisp
+
30
−
0
View file @
3665075a
...
@@ -405,3 +405,33 @@
...
@@ -405,3 +405,33 @@
(
define-test
issue.41.2
(
define-test
issue.41.2
(
:tag
:issues
)
(
:tag
:issues
)
(
issue-41-tester
unix:sigtstp
))
(
issue-41-tester
unix:sigtstp
))
(
define-test
issue.45
(
:tag
:issues
)
;; This depends on run-tests to setup the test directory correctly!
(
let*
((
test-dir
#p"test-tmp/"
)
(
test-dir-name
(
namestring
test-dir
)))
(
flet
((
do-test
(
program
)
(
with-output-to-string
(
s
)
(
let
((
process
(
ext:run-program
program
(
list
test-dir-name
)
:wait
t
:output
s
)))
;; Verify process exited without error and that we
;; got the expected output.
(
assert-eql
0
(
ext:process-exit-code
process
))
(
assert-equal
"ls-link
"
(
get-output-stream-string
s
))))))
;; Test that absolute paths work.
(
do-test
"/bin/ls"
)
;; Test that unspecfied path works. This depends on "ls" being
;; somewhere in PATH.
(
do-test
"ls"
)
;; Test that relative path to program works. (Issue #45).
(
do-test
(
concatenate
'string
"./"
test-dir-name
"ls-link"
)))))
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