Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
jberryman
GHC
Commits
3b8b96b3
Commit
3b8b96b3
authored
Nov 02, 1999
by
sof
Browse files
[project @ 1999-11-02 11:25:42 by sof]
updated with expected-output files
parent
727f51dc
Changes
6
Hide whitespace changes
Inline
Side-by-side
ghc/tests/lib/should_run/io001.hs
View file @
3b8b96b3
...
...
@@ -64,6 +64,7 @@ main = do
hClose
h
putStrLn
"
\n
Using hSeek/SeekFromEnd: "
putStrLn
"(Don't worry if you're seeing differing numbers here, it might be down to '
\\
n' vs '
\\
r
\\
n')"
h
<-
openFile
"io001.hs"
ReadMode
recordDoAndRepos3
h
$
recordDoAndRepos3
h
$
...
...
ghc/tests/lib/should_run/io001.stdout
0 → 100644
View file @
3b8b96b3
At position: 0, found: '-'
At position: 1, found: '-'
At position: 2, found: ' '
At position: 3, found: '!'
At position: 4, found: '!'
At position: 4, found: '!'
At position: 3, found: '!'
At position: 2, found: ' '
At position: 1, found: '-'
At position: 0, found: '-'
At position: 0, found: '-'
At position: 1, found: '-'
At position: 2, found: ' '
At position: 3, found: '!'
At position: 4, found: '!'
At position: 4, found: '!'
At position: 3, found: '!'
At position: 2, found: ' '
At position: 1, found: '-'
At position: 0, found: '-'
Using hSeek/AbsoluteSeek:
At position: 0, found: '-'
At position: 1, found: '-'
At position: 2, found: ' '
At position: 3, found: '!'
At position: 4, found: '!'
At position: 4, found: '!'
At position: 3, found: '!'
At position: 2, found: ' '
At position: 1, found: '-'
At position: 0, found: '-'
Using hSeek/SeekFromEnd:
(Don't worry if you're seeing differing numbers here, it might be down to '\n' vs '\r\n')
At position: 0, found: '-'
At position: 1, found: '-'
At position: 2, found: ' '
At position: 3, found: '!'
At position: 4, found: '!'
At position: 1740, found: ' '
At position: 1741, found: '"'
At position: 1742, found: '"'
At position: 1743, found: '\n'
At position: 1743, found: '\n'
ghc/tests/lib/should_run/io002.hs
View file @
3b8b96b3
...
...
@@ -8,17 +8,18 @@ import Directory
main
::
IO
()
main
=
do
h
<-
openFile
"tst-seek"
WriteMode
hPutStr
Ln
h
"test string1"
hPutStr
h
"test string1"
-- seek to EOF should be cool..
hSeek
h
SeekFromEnd
0
hPutStr
h
"test string2"
-- seek past EOF should now be cool..
-- seek past EOF should now
also
be cool..
hSeek
h
SeekFromEnd
3
hPutStr
h
"test string3"
hSeek
h
AbsoluteSeek
13
hPutStr
h
"test string4"
x
<-
hTell
h
print
x
hPutStr
h
"filler"
hClose
h
ls
<-
readFile
"tst-seek"
putStrLn
ls
...
...
ghc/tests/lib/should_run/io002.stdout
0 → 100644
View file @
3b8b96b3
25
test string1ttest string4filler string3
ghc/tests/lib/should_run/ioexts001.hs
View file @
3b8b96b3
...
...
@@ -7,6 +7,6 @@ import IOExts
loop
r
0
=
return
()
loop
r
c
=
loop
r
(
c
-
1
)
>>
writeIORef
r
42
main
=
newIORef
0
>>=
\
r
->
loop
r
1000000
main
=
newIORef
0
>>=
\
r
->
loop
r
1000000
>>
putStrLn
"done"
ghc/tests/lib/should_run/ioexts001.stdout
0 → 100644
View file @
3b8b96b3
done
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