make the planet cmdline-tool.rkt test more informative in the case that there are planet packages installed

This commit is contained in:
Robby Findler 2011-11-21 08:26:51 -06:00
parent 19ccc17bf6
commit a333b43259

View File

@ -36,9 +36,10 @@ using 'system' to call out to the tool and then reading its results, etc.
(when debug? (display (get-output-string sp))) (when debug? (display (get-output-string sp)))
(get-output-string sp))) (get-output-string sp)))
(unless (regexp-match #rx"No packages" (call-planet "show")) (let ([result (call-planet "show")])
(error 'cmdline-tool.rkt "please clear out all planet packages before running this test")) (unless (regexp-match #rx"No packages" result)
(error 'cmdline-tool.rkt "please clear out all planet packages before running this test.\n============================================================\n~a" result)))
(when (file-exists? test-connection.plt-cache) (when (file-exists? test-connection.plt-cache)
(delete-file test-connection.plt-cache)) (delete-file test-connection.plt-cache))