summaryrefslogtreecommitdiff
path: root/lib/bio
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bio')
-rw-r--r--lib/bio/test/bio-peek.myr18
-rw-r--r--lib/bio/test/bio-read.myr2
2 files changed, 10 insertions, 10 deletions
diff --git a/lib/bio/test/bio-peek.myr b/lib/bio/test/bio-peek.myr
index c6528cb..506dea0 100644
--- a/lib/bio/test/bio-peek.myr
+++ b/lib/bio/test/bio-peek.myr
@@ -8,19 +8,19 @@ const main = {
match bio.open("data/datafile", bio.Rd)
| `std.Ok bio: f = bio
- | `std.Err m: std.fatal("Unable to open data file: {}", m)
+ | `std.Err m: std.fatal("Unable to open data file: {}\n", m)
;;
- std.assert(peekb(f) == 0x30, "wrong byte value read from datafile")
- std.assert(peekc(f) == '0', "wrong char value read from datafile")
+ std.assert(peekb(f) == 0x30, "wrong byte value read from datafile\n")
+ std.assert(peekc(f) == '0', "wrong char value read from datafile\n")
bio.read(f, buf[:4]) /* skip ahead 4 bytes */
- std.assert(peekb(f) == 0x34, "wrong byte value read from datafile")
- std.assert(peekc(f) == '4', "wrong char value read from datafile")
+ std.assert(peekb(f) == 0x34, "wrong byte value read from datafile\n")
+ std.assert(peekc(f) == '4', "wrong char value read from datafile\n")
bio.read(f, buf[:]) /* skip ahead 64k */
- std.assert(peekb(f) == 0x30, "wrong byte value read from datafile")
- std.assert(peekc(f) == '0', "wrong char value read from datafile")
+ std.assert(peekb(f) == 0x30, "wrong byte value read from datafile\n")
+ std.assert(peekc(f) == '0', "wrong char value read from datafile\n")
bio.close(f);
std.put("Succeded peeeking values\n")
@@ -30,7 +30,7 @@ const peekc = {f
match bio.peekc(f)
| `bio.Ok c: -> c
| `bio.Eof:
- std.put("eof")
+ std.put("eof\n")
-> -1
| `bio.Err e:
std.fatal("error reading\n")
@@ -42,7 +42,7 @@ const peekb = {f
match bio.peekb(f)
| `bio.Ok b: -> b
| `bio.Eof:
- std.put("eof")
+ std.put("eof\n")
-> -1
| `bio.Err e:
std.fatal("error reading\n")
diff --git a/lib/bio/test/bio-read.myr b/lib/bio/test/bio-read.myr
index c4491b9..829b442 100644
--- a/lib/bio/test/bio-read.myr
+++ b/lib/bio/test/bio-read.myr
@@ -9,7 +9,7 @@ const main = {
match bio.open("data/datafile", bio.Rd)
| `std.Ok bio: f = bio
- | `std.Err m: std.fatal("Unable to open data file: {}", m)
+ | `std.Err m: std.fatal("Unable to open data file: {}\n", m)
;;
/* read a 4 byte chunk j*/