[project @ 2001-08-22 12:24:41 by simonmar]
[ghc-hetmet.git] / ghc / tests / lib / posix / posix007.hs
diff --git a/ghc/tests/lib/posix/posix007.hs b/ghc/tests/lib/posix/posix007.hs
deleted file mode 100644 (file)
index 2e62820..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-import Posix
-
--- This test is an example of where something more sophisticated than runstdtest
--- is required, as its interactive.
-
-main = do
-    installHandler keyboardSignal (Catch doCtrlC) Nothing
-    ta  <- getTerminalAttributes stdInput
-    case (controlChar ta Interrupt) of
-      Nothing -> fixMe ta
-      Just x  -> continue x
-
-fixMe ta = do
-    putStr "Oops...no interrupt character?\nI can fix that...\n"
-    setTerminalAttributes stdInput (withCC ta (Interrupt, '\ETX')) Immediately
-    ta   <- getTerminalAttributes stdInput
-    case (controlChar ta Interrupt) of
-      Nothing -> putStr "...Then again, maybe I can't\n"
-      Just x -> continue x
-
-continue x =
-    putStr "Press '"
-    putStr (ccStr x)
-    putStr "'.\n"
-    awaitSignal Nothing
-    putStr "How did I get here?\n"
-
-doCtrlC =
-    putStr "Caught an interrupt.\n"
-
-ccStr '\DEL' = "^?"
-ccStr x 
-  | x >= ' ' = [x]
-  | otherwise = ['^', (toEnum (fromEnum x + fromEnum '@'))]