╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ undo.zig ─────────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
207 const files = try ui.Repo.init(&arena, &session, ui.RoutablePage.repoFilesRoute("", null, "", "", 0).?); 208 try std.testing.expectEqual(0, files.undo.?.items.len); 209 try std.testing.expectEqualStrings("InvalidUndoRecord", files.undo.?.failure.?); 210 const undo = try ui.Repo.init(&arena, &session, ui.RoutablePage.repoUndoRoute("", null).?); 211 try std.testing.expectEqualStrings("InvalidUndoRecord", undo.undo.?.failure.?); 212 213 var root = ui.Widget{ .repo_undo = try Undo.View.init(allocator, &undo.undo.?, &session) }; 214 defer root.deinit(allocator); 215 try root.build(allocator, constraint, root.getFocus()); 216 const html = try @import("../web.zig").generateHtml(allocator, &root, &session); 217 defer allocator.free(html); 218 try std.testing.expect(std.mem.indexOf(u8, html, "InvalidUndoRecord") != null); 219 } 220