From ee823569fe3cd029edd36d871323dc4dbcadc838 Mon Sep 17 00:00:00 2001 From: "Robert P. Goldman" <rpgoldman@real-time.com> Date: Fri, 24 Dec 2010 10:30:47 -0600 Subject: [PATCH] Proposed repair for Windows and better search for true and false. Attempt to use features to prevent running this script on Windows. Checks Mac and POSIX positions of true and false. --- test/run-shell-command-test.script | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/test/run-shell-command-test.script b/test/run-shell-command-test.script index 6c490bfe..216424fb 100644 --- a/test/run-shell-command-test.script +++ b/test/run-shell-command-test.script @@ -4,7 +4,14 @@ ;;; test asdf run-shell-command function ;;; Stas Boukarev found (and fixed) a bug where on clisp asdf:run-shell-command might not return -;;; the right value. This attemtps to test for that. -(quit-on-error - (assert (eql 1 (asdf:run-shell-command "/usr/bin/false"))) - (assert (eql 0 (asdf:run-shell-command "/usr/bin/true")))) +;;; the right value. This attempts to test for that. +(unless (some #'(lambda (x) (member x *features*)) + '(:win :windows :mswindows :win32 :mingw32)) + (quit-on-error + (let ((true-false-dir + (cond ((probe-file "/bin/true") "/bin/") + ((probe-file "/usr/bin/true") "/usr/bin/") + (t (error "Unable to find the standard true binary."))))) + (assert (eql 1 (asdf:run-shell-command (concatenate 'string true-false-dir "false")))) + (assert (eql 0 (asdf:run-shell-command (concatenate 'string true-false-dir "true"))))))) + -- GitLab