cli: tests for +explain-config explain functions

This commit is contained in:
Jon Parise
2026-03-15 21:04:35 -04:00
parent cef1f19d24
commit 9783f6c79c

View File

@@ -128,3 +128,15 @@ fn explainKeybind(name: []const u8) ?[]const u8 {
},
};
}
test "explain" {
// Config options
try std.testing.expect(explainOption("font-size") != null);
try std.testing.expect(explainOption("copy_to_clipboard") == null);
try std.testing.expect(explainOption("unknown-option") == null);
// Keybind actions
try std.testing.expect(explainKeybind("copy_to_clipboard") != null);
try std.testing.expect(explainKeybind("font-size") == null);
try std.testing.expect(explainKeybind("unknown_keybind") == null);
}