Improving tests
This commit is contained in:
@@ -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,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")
|
||||
|
||||
Reference in New Issue
Block a user