lib: collapse the parallel vstream scaffold onto the single Hare io surface (#94 fold-eFinal)
The Option-C parallel _v vstream API was scaffolding to bring the io stack up alongside the old surface; carrying both permanently is a rule-9 divergence from ref/hare, which has exactly one io surface. Collapse onto that surface (stream = *vtable, ref/hare/io/stream.ha) and rename the _v symbols to their Hare names (io vstream->stream, fmt vfprint->fprint, bufio/memio/log surfaces, log.new). Deletes the 4 lib/*/vstream.ww scaffold files; regenerates w6c/wwdump combined.ww. cstage and wwstage stay byte-identical and combined_ww_fresh holds; all 220 tests pass.
This commit is contained in:
@@ -108,22 +108,21 @@ fn checkempty(in: str) void = {
|
||||
};
|
||||
|
||||
fn checkquote(in: str, expected: str) void = {
|
||||
let mst: memio.state;
|
||||
let snk: io.stream;
|
||||
memio.dynamic(&mst, &snk);
|
||||
let st: memio.stream = memio.dynamic();
|
||||
let snk: io.stream = &st.vt;
|
||||
|
||||
let r = shlex.quote(&snk, in);
|
||||
let n: i32 = 0;
|
||||
let r = shlex.quote(snk, in);
|
||||
let n: size = 0;
|
||||
match (r) {
|
||||
case let v: i32 => { n = v; };
|
||||
case io.closed => { fail(); };
|
||||
case let v: size => { n = v; };
|
||||
case let _e: io.error => { fail(); };
|
||||
};
|
||||
if (n != expected.len) { fail(); };
|
||||
if (n != expected.len: size) { fail(); };
|
||||
|
||||
let view: str = memio.string(&mst);
|
||||
let view: str = memio.string(&st);
|
||||
if (!streq(view, expected)) { fail(); };
|
||||
|
||||
let _c = io.close(&snk);
|
||||
let _c: (void | io.error) = io.close(snk);
|
||||
};
|
||||
|
||||
// ---- split: Hare's @test fn split() table --------------------------
|
||||
|
||||
Reference in New Issue
Block a user