Idris2/tests/base/system_system/Test.idr

12 lines
333 B
Idris
Raw Normal View History

2021-06-30 02:12:10 +03:00
import System
main : IO ()
main = do
0 <- system "bash zero.sh"
| r => do putStrLn ("expecting zero, got " ++ (show r))
exitFailure
-- `system` returns result of `waitpid` which is not trivial to decode
let True = !(system "bash seventeen.sh") /= 0
| False => putStrLn "expecting 17, got zero"
pure ()