aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/resourceLimit.hs
diff options
context:
space:
mode:
authorGravatar Ian Lynagh <igloo@earth.li>2008-05-20 16:30:12 +0000
committerGravatar Ian Lynagh <igloo@earth.li>2008-05-20 16:30:12 +0000
commitb6b7b6a9a91d50b0f84f216eaf2dd19279ee08cf (patch)
treef445d078f5ebe37fde758b7f21e61d3dd450956c /tests/resourceLimit.hs
parentee9bbce02746792fd8b5defdf319d94d9708962b (diff)
Add a test for #2038 (resourceLimit)
Diffstat (limited to 'tests/resourceLimit.hs')
-rw-r--r--tests/resourceLimit.hs16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/resourceLimit.hs b/tests/resourceLimit.hs
new file mode 100644
index 0000000..05e35af
--- /dev/null
+++ b/tests/resourceLimit.hs
@@ -0,0 +1,16 @@
+
+-- #2038
+
+import System.Posix.Resource
+
+main :: IO ()
+main = do
+ let soft = ResourceLimit 5
+ hard = ResourceLimit 10
+ setResourceLimit ResourceCPUTime (ResourceLimits soft hard)
+ r <- getResourceLimit ResourceCPUTime
+ let (ResourceLimit s) = softLimit r
+ let (ResourceLimit h) = hardLimit r
+ putStrLn $ show s
+ putStrLn $ show h
+