Commit 5a12d21e authored by Karsten Poeck's avatar Karsten Poeck
Browse files

Mark failing tests for clasp

parent 0d0fb4bf
......@@ -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"))))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment