ref: 16570e96dac87d60ed54aee8d3ff277923e36b5b
parent: a3684bcdf61e987bc4dc83bdcc5a881566bece78
author: Ori Bernstein <ori@eigenstate.org>
date: Sat Jul 22 18:09:23 EDT 2017
Terminate error message lines.
--- a/lib/bio/test/bio-peek.myr
+++ b/lib/bio/test/bio-peek.myr
@@ -8,19 +8,19 @@
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 @@
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 @@
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")
--- a/lib/bio/test/bio-read.myr
+++ b/lib/bio/test/bio-read.myr
@@ -9,7 +9,7 @@
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*/