diff --git a/test/test-run-program.script b/test/test-run-program.script
index 4af0b8fd87de8ae7dac51e404cdec880d9f498ca..aee02ce90b851d80da394e7997aeee369d3bff7e 100644
--- a/test/test-run-program.script
+++ b/test/test-run-program.script
@@ -25,7 +25,9 @@
    (with-output-to-string (s)
      (let ((*verbose-out* t)
            (*standard-output* s))
-       (run-shell-command "echo ok ~D" 1)))
+       (let ((status (run-shell-command "echo ok ~D" 1)))
+         (unless (zerop status)
+           (error "Didn't get good exit status.")))))
    ok1))
 ;; NB1: run-shell-command is deprecated. Use run-program instead.
 ;; NB2: we do NOT support stderr capture to *verbose-out* anymore in run-shell-command.