Improving tests

This commit is contained in:
2025-12-06 08:21:03 +02:00
parent a1c16ba5ca
commit 9e2c609b68
4 changed files with 18 additions and 8 deletions
+4
View File
@@ -15,3 +15,7 @@ Run given cmd string and return output as list of lines.
Run given cmd string and return output as sexp using read.
(**shell-exit-code**)
Returns exit code of previous command that was run.
+7 -6
View File
@@ -7,13 +7,14 @@
(test-begin "shell")
(write (shell "ls"))
(newline)
(test-equal "Linux\n" (shell "uname"))
(test-equal 0 (shell-exit-code))
(write (shell->list "ls"))
(newline)
(test-equal '("Linux") (shell->list "uname"))
(test-equal 0 (shell-exit-code))
(test-equal '(1 2 3) (shell->sexp "echo '(1 2 3)'"))
(test-equal 0 (shell-exit-code))
(write (shell->sexp "echo '(1 2 3)'"))
(newline)
(test-end "shell")