Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
dfd54ce1
Commit
dfd54ce1
authored
Jul 22, 2007
by
Ian Lynagh
Browse files
Add a test for copyFile
parent
32b0f9d9
Changes
4
Hide whitespace changes
Inline
Side-by-side
testsuite/tests/ghc-regress/lib/IO/all.T
View file @
dfd54ce1
...
...
@@ -54,6 +54,7 @@ test('misc001', extra_run_opts('misc001.hs misc001.out'), \
compile_and_run
,
[''])
clean
(['
misc001.out
'])
test
('
copyFile001
',
normal
,
compile_and_run
,
[''])
test
('
openFile001
',
normal
,
compile_and_run
,
[''])
test
('
openFile002
',
exit_code
(
1
),
compile_and_run
,
[''])
test
('
openFile003
',
normal
,
compile_and_run
,
[''])
...
...
testsuite/tests/ghc-regress/lib/IO/copyFile/source
0 → 100644
View file @
dfd54ce1
This is the data
\ No newline at end of file
testsuite/tests/ghc-regress/lib/IO/copyFile001.hs
0 → 100644
View file @
dfd54ce1
module
Main
(
main
)
where
import
Control.Exception
import
Data.List
import
System.Directory
import
System.IO
main
::
IO
()
main
=
do
try
$
removeFile
to
cs_before
<-
getDirectoryContents
"copyFile"
putStrLn
"Before:"
print
$
sort
cs_before
copyFile
from
to
cs_before
<-
getDirectoryContents
"copyFile"
putStrLn
"After:"
print
$
sort
cs_before
readFile
to
>>=
print
from
,
to
::
FilePath
from
=
"copyFile/source"
to
=
"copyFile/target"
testsuite/tests/ghc-regress/lib/IO/copyFile001.stdout
0 → 100644
View file @
dfd54ce1
Before:
[".","..","source"]
After:
[".","..","source","target"]
"This is the data"
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment