Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Karsten Poeck
asdf
Commits
5a12d21e
Commit
5a12d21e
authored
Jan 11, 2020
by
Karsten Poeck
Browse files
Mark failing tests for clasp
parent
0d0fb4bf
Changes
1
Hide whitespace changes
Inline
Side-by-side
test/test-run-program.script
View file @
5a12d21e
...
...
@@ -37,7 +37,8 @@
(DBG "Testing true via run-shell-command")
(assert-equal 0 (run-shell-command "exit 0"))
(DBG "Testing false via run-shell-command")
(assert-equal 1 (run-shell-command "exit 1"))
(with-expected-failure (#+clasp "clasp fails on (EXT:SYSTEM \"exec < /dev/null >> /dev/null 2>> /dev/null ; exit 0\")")
(assert-equal 1 (run-shell-command "exit 1")))
(DBG "Testing bad shell command via run-shell-command")
(unless (< 0 (run-shell-command "./bad-shell-command"))
(error "Failed to capture exit status indicating shell command failure.")))
...
...
@@ -62,28 +63,37 @@
#+os-windows '(("cmd /c exit 0" . 0) ("cmd /c exit 1" . 1))
:do (loop
:for force-shell :in '(t nil)
:do (assert-equal `(nil nil ,exit-code)
(multiple-value-list
(run-program program
:ignore-error-status t
:force-shell force-shell
:output :interactive)))))
:do (if (string= program "true")
(assert-equal `(nil nil ,exit-code)
(multiple-value-list
(run-program program
:ignore-error-status t
:force-shell force-shell
:output :interactive)))
(with-expected-failure (#+clasp "Fails for false")
(assert-equal `(nil nil ,exit-code)
(multiple-value-list
(run-program program
:ignore-error-status t
:force-shell force-shell
:output :interactive)))))))
#+(and ecl os-windows)
(DBG "Test skipped on ECL + Windows")
#-(and ecl os-windows)
(assert-equal
'("foo" "bar baz" 42)
(multiple-value-bind (o e c)
(run-program #+os-unix "cat ; echo bar baz >&2 ; exit 42"
#+os-windows "findstr \"^\" & echo bar baz >&2 & exit 42"
;; On some versions of windows, findstr hangs indefinitely
;; when passed input without a trailing newline
:input '("foo" :terpri t)
:output '(:string :stripped t) :error-output '(:string :stripped t)
:ignore-error-status t)
(DBG "aaa" o e c)
(list (dewindowize o) (dewindowize e) c)))
(with-expected-failure (#+clasp "Fails")
(assert-equal
'("foo" "bar baz" 42)
(multiple-value-bind (o e c)
(run-program #+os-unix "cat ; echo bar baz >&2 ; exit 42"
#+os-windows "findstr \"^\" & echo bar baz >&2 & exit 42"
;; On some versions of windows, findstr hangs indefinitely
;; when passed input without a trailing newline
:input '("foo" :terpri t)
:output '(:string :stripped t) :error-output '(:string :stripped t)
:ignore-error-status t)
(DBG "aaa" o e c)
(list (dewindowize o) (dewindowize e) c))))
#-(and ecl os-windows)
(assert-equal
'(("foo" "bar" "baz" "quux") nil 0)
...
...
@@ -236,7 +246,8 @@
(DBG "Checking behavior on program success or failure")
(assert-equal '(nil nil 0) (multiple-value-list (run-program "true")))
(signals subprocess-error (run-program "false"))
(assert-equal '(nil nil 1) (multiple-value-list (run-program "false" :ignore-error-status t)))
(with-expected-failure (#+clasp "Fails")
(assert-equal '(nil nil 1) (multiple-value-list (run-program "false" :ignore-error-status t))))
(DBG "Tests with test-file")
(let ((tf (native-namestring (test-source "test-file"))))
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment