add a test for getHomeDirectory et. al.
authorSimon Marlow <marlowsd@gmail.com>
Mon, 29 Jun 2009 11:08:36 +0000 (11:08 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Mon, 29 Jun 2009 11:08:36 +0000 (11:08 +0000)
tests/all.T
tests/getHomeDirectory001.hs [new file with mode: 0644]

index 2677813..a25fe2e 100644 (file)
@@ -19,3 +19,6 @@ test('renameFile001', extra_clean(['renameFile001.tmp1','renameFile001.tmp2']),
 test('createDirectory001',  normal, compile_and_run, [''])
 
 test('createDirectoryIfMissing001',  normal, compile_and_run, [''])
+
+# No sane way to tell whether the output is reasonable here...
+test('getHomeDirectory001',  ignore_output, compile_and_run, [''])
diff --git a/tests/getHomeDirectory001.hs b/tests/getHomeDirectory001.hs
new file mode 100644 (file)
index 0000000..ab3eae7
--- /dev/null
@@ -0,0 +1,8 @@
+import System.Directory\r
+\r
+main = do\r
+  getHomeDirectory               >>= print\r
+  getAppUserDataDirectory "test" >>= print\r
+  getUserDocumentsDirectory      >>= print\r
+  getTemporaryDirectory          >>= print\r
+  return ()\r