summaryrefslogtreecommitdiff
path: root/libraries/base/tests
diff options
context:
space:
mode:
authorJosh Meredith <joshmeredith2008@gmail.com>2023-04-13 16:12:38 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2023-04-25 00:15:58 -0400
commitebd5b0781c6e6f4642db91353fab0f0ec04af3bc (patch)
treee8201a9fd9f4b5448fbcd7a52861e5e7eac92b7b /libraries/base/tests
parent0da9e88273a0ffb13132631fb5ea526ea9efeeb9 (diff)
downloadhaskell-ebd5b0781c6e6f4642db91353fab0f0ec04af3bc.tar.gz
JS/base: provide implementation for mkdir (issue 22374)
Diffstat (limited to 'libraries/base/tests')
-rw-r--r--libraries/base/tests/IO/all.T4
-rw-r--r--libraries/base/tests/IO/mkdirExists.hs8
-rw-r--r--libraries/base/tests/IO/mkdirExists.stderr1
3 files changed, 12 insertions, 1 deletions
diff --git a/libraries/base/tests/IO/all.T b/libraries/base/tests/IO/all.T
index 92cb93add5..1a54564896 100644
--- a/libraries/base/tests/IO/all.T
+++ b/libraries/base/tests/IO/all.T
@@ -64,7 +64,7 @@ test('misc001', [extra_run_opts('misc001.hs misc001.out')], compile_and_run,
test('openFile001', normal, compile_and_run, [''])
test('openFile002', [exit_code(1), normalise_win32_io_errors], compile_and_run, [''])
-test('openFile003', [normalise_win32_io_errors, js_broken(22374)], compile_and_run, [''])
+test('openFile003', [normalise_win32_io_errors, js_broken(22362)], compile_and_run, [''])
test('openFile004', [], compile_and_run, [''])
test('openFile005', js_broken(22261), compile_and_run, [''])
test('openFile006', [], compile_and_run, [''])
@@ -152,3 +152,5 @@ test('T17510', expect_broken(17510), compile_and_run, [''])
test('bytestringread001', extra_run_opts('test.data'), compile_and_run, [''])
test('T17912', [only_ways(['threaded1']), when(opsys('mingw32'),expect_broken(1))], compile_and_run, [''])
test('T18832', only_ways(['threaded1']), compile_and_run, [''])
+
+test('mkdirExists', [exit_code(1), when(opsys('mingw32'), ignore_stderr)], compile_and_run, [''])
diff --git a/libraries/base/tests/IO/mkdirExists.hs b/libraries/base/tests/IO/mkdirExists.hs
new file mode 100644
index 0000000000..19f5e77f9b
--- /dev/null
+++ b/libraries/base/tests/IO/mkdirExists.hs
@@ -0,0 +1,8 @@
+module Main where
+
+import System.Directory
+
+main :: IO ()
+main = do
+ createDirectory "foo"
+ createDirectory "foo"
diff --git a/libraries/base/tests/IO/mkdirExists.stderr b/libraries/base/tests/IO/mkdirExists.stderr
new file mode 100644
index 0000000000..4d12490fa6
--- /dev/null
+++ b/libraries/base/tests/IO/mkdirExists.stderr
@@ -0,0 +1 @@
+mkdirExists: foo: createDirectory: already exists (File exists)