feat(core): the command line with its local commands after Java, measured against Java

The terminal splits a line as Java's window does and runs ls, cd, pwd,
mkdir, touch, cp, mv, rm, cat, test, help, ipconfig and route on the
node's files, which are the project's own. Its texts are generated from
the bundle Java loads. TerminalCases feeds Java's Terminal without a
network (16 cases, de and en); eight cases name Java bugs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-01 20:32:35 +00:00
co-authored by Claude Opus 5.5
parent 058675a148
commit 016f9461df
17 changed files with 14404 additions and 7 deletions
@@ -261,6 +261,19 @@ export class VirtualFileSystem {
});
}
/**
* A directory's entries in the order they were made, as Java's file tree
* keeps them (its command line lists them so); a file written anew keeps
* its place.
*/
entriesInCreationOrder(rawDirectoryPath: string): VirtualFileEntry[] {
const directoryPath = this.existingPath(rawDirectoryPath);
if (this.get(directoryPath)?.kind !== 'directory') fail('expectedDirectory', directoryPath);
return [...this.store.values()]
.filter(({ path }) => !swiftEqual(path, directoryPath) && swiftEqual(parentPath(path), directoryPath))
.map(({ path, content }) => ({ path, content }));
}
textFile(rawPath: string): string {
const entry = this.entry(rawPath);
if (entry.content.kind !== 'text') fail('expectedTextFile', entry.path);