- Old tests fixed

- Added a static Fixuture class for test mockups
This commit is contained in:
2026-08-28 16:52:59 +02:00
parent 310218663d
commit 1ee2a2fe7a
13 changed files with 161 additions and 306 deletions
+4 -6
View File
@@ -15,8 +15,6 @@ import type { TreeNode } from "@core/filesystem/treenode";
import { getCurrentSession, type GroupInfo, type UserInfo } from "@core/session_manager";
import { createInitialShellState, type ShellState } from "@core/shell_state";
import { resolveInode } from "@core/util/path_resolver";
import { sortTreeNodes } from "@core/util/sort";
import { dnTraverseTree } from "@core/util/tree_traversal";
import { deserializeFileSystem } from "@shell/serializer";
import { Shell } from "@shell/shell";
import { printTree } from "./util/tree_visualizer";
@@ -50,10 +48,10 @@ groups.set(1000, group);
const state: ShellState = createInitialShellState(fs, users, groups, user);
await Shell.init(state);
console.log(resolveInode(Shell.Instance?.State!, 6));
console.log(resolveInode(Shell.Instance?.State!, 6, true));
//console.log(resolveInode(Shell.Instance?.State!, 6));
//console.log(resolveInode(Shell.Instance?.State!, 6, true));
console.log(sortTreeNodes(Shell.Instance?.State!, dnTraverseTree(Shell.Instance?.State.filesystem!, 0)));
//console.log(sortTreeNodes(Shell.Instance?.State!, dnTraverseTree(Shell.Instance?.State.filesystem!, 0)));
Shell.Instance?.on("result", payload => {
const decoded = new TextDecoder().decode(payload.result.stdout.toArray());
@@ -73,7 +71,7 @@ Shell.Instance?.on("result", payload => {
}); */
//console.clear();
process.stdout.write(resolveInode(Shell.Instance?.State!, getCurrentSession(state).cwd) + "\n> ");
process.stdout.write(resolveInode(state, getCurrentSession(state).cwd) + "\n> ");
process.stdin.on("data", async data => {
if (Shell.Instance?.BoundPID !== null) {
Shell.Instance?.sendInput(data.toString().trim());