diff options
author | Camil Staps | 2016-02-02 19:24:50 +0100 |
---|---|---|
committer | Camil Staps | 2016-02-02 19:24:50 +0100 |
commit | a7d7542dc646a5fd124ef71e71ce260889f1701b (patch) | |
tree | 04ed89503bbb3cc9933273a1326a53ca724c3492 /files/practicum/TestSimpleFileIO.icl | |
parent | week6 camil: working positioning of lines by putting empties at left and righ... (diff) |
Diffstat (limited to 'files/practicum/TestSimpleFileIO.icl')
-rw-r--r-- | files/practicum/TestSimpleFileIO.icl | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/files/practicum/TestSimpleFileIO.icl b/files/practicum/TestSimpleFileIO.icl deleted file mode 100644 index 539e155..0000000 --- a/files/practicum/TestSimpleFileIO.icl +++ /dev/null @@ -1,31 +0,0 @@ -module TestSimpleFileIO
-
-import SimpleFileIO, StdEnv
-
-bestand n :== "TestSimpleFileIO" +++ toString n +++ ".icl"
-
-Start :: *World -> (String,*World)
-
-/* Test onderdeel 1: */
-Start world
- = case readFile (bestand "") world of
- (Just inhoud,world)
- = case writeFile (bestand 1) inhoud world of
- (True,world) = ("Bestand '" +++ bestand 1 +++ "' geschreven.\n", world)
- (_, world) = ("Bestand '" +++ bestand 1 +++ "'niet geschreven.\n",world)
- (nothing, world) = ("Kon '" +++ bestand "" +++ "' niet lezen.\n",world)
-
-/* Test onderdeel 2: */
-Start world
- = case readLines (bestand 1) world of
- (Just regels,world)
- = case writeLines (bestand 2) (reverse regels) world of
- (True, world) = ("Bestand '" +++ bestand 2 +++ "' geschreven.\n", world)
- (False,world) = ("Bestand '" +++ bestand 2 +++ "' niet geschreven.\n",world)
- (nothing,world) = ("Kon '" +++ bestand 1 +++ "' niet lezen.\n",world)
-
-/* Test onderdeel 3: */
-Start world
- = case mapFile (bestand 2) (bestand 3) (map toUpper) world of
- (False,world) = ("Kon '" +++ bestand 2 +++ "' niet lezen of '" +++ bestand 3 +++ "' niet schrijven.\n",world)
- (_, world) = ("Bestand '" +++ bestand 3 +++ "' geschreven.\n",world)
|