summaryrefslogtreecommitdiff
path: root/testsuite/tests/lib/libposix/posix013.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/lib/libposix/posix013.hs')
-rw-r--r--testsuite/tests/lib/libposix/posix013.hs21
1 files changed, 21 insertions, 0 deletions
diff --git a/testsuite/tests/lib/libposix/posix013.hs b/testsuite/tests/lib/libposix/posix013.hs
new file mode 100644
index 0000000000..b78930b44e
--- /dev/null
+++ b/testsuite/tests/lib/libposix/posix013.hs
@@ -0,0 +1,21 @@
+--!! Querying for system information.
+module Main(main) where
+
+import Posix
+
+main = do
+ sid <- getSystemID
+ let
+ info =
+ [ "Node Name: " , nodeName sid
+ , "OS: " , systemName sid
+ , "Arch: " , machine sid
+ , "Version: " , version sid
+ , "Release: " , release sid
+ ]
+ putStrLn2 info
+
+putStrLn2 :: [String] -> IO ()
+putStrLn2 [] = return ()
+putStrLn2 [x] = putStrLn x
+putStrLn2 (x1:x2:xs) = putStrLn (x1++x2) >> putStrLn2 xs