cli: add caller-buffer lexical path APIs
Add pure std.path queries and failure-preserving normalization/join using safe reverse measurement/emission and caller-provided output storage. Component queries return explicit Copy ranges; filesystem authority is checked independently. Complete the STD-7 implementation gate. Validation: 1079 conformance cases, 18 path cases with per-step collection and 12-seed schedule stress, independent 132-path/49-join capacity oracle, 68 CLI checks, fourteen previous source/std CLI suites, unit/Quick Reference, formatting, hosted smoke, 117/117 source coverage and reference budgets.
This commit is contained in:
1 parent
8d8bef8f3e
commit
8edec5b831
35 files changed
+1189
-8
No files matched your search
@@ -0,0 +1,11 @@
|
||||
// expect: reject E7005
|
||||
// phase: 6
|
||||
// spec: docs/spec/16-standard-library.md §2.19
|
||||
module test.path
|
||||
import std.path;
|
||||
import std.bytes;
|
||||
fn written(result: std.path.WriteResult) -> usize effects [] {
|
||||
match result { std.path.WriteResult::ok(n) => { return n; }, std.path.WriteResult::invalid_input => { trap; }, std.path.WriteResult::size_overflow => { trap; }, std.path.WriteResult::short_output => { trap; } }
|
||||
}
|
||||
fn bad(path: slice<u8>) -> usize effects [] { return std.path.basename(path); }
|
||||
fn main() -> u64 effects [] { return 42; }
|
||||
Reference in new issue
Block a user