commit 32695280ab1bf25a903f60449f72f1101dc777cf
parent 72eaeb4ce0073bac51e477b88339857cf6f7fca6
Author: Andrew Laack <andrew@laack.co>
Date: Sun, 27 Sep 2026 16:21:51 -0500
Small tweaks
Diffstat:
3 files changed, 2 insertions(+), 12 deletions(-)
diff --git a/src/gemini-client.cpp b/src/gemini-client.cpp
@@ -1,5 +1,3 @@
-#include <filesystem>
-#include <iostream>
#include <stdexcept>
#include <sys/socket.h>
#include <sys/time.h>
diff --git a/src/main.cpp b/src/main.cpp
@@ -3,10 +3,7 @@
#include <algorithm>
#include <cassert>
#include <cstddef>
-#include <filesystem>
-#include <iostream>
#include <ncurses.h>
-#include <optional>
#include <string>
#include <unctrl.h>
#include <utility>
@@ -335,9 +332,6 @@ int main(int argc, char** argv) {
initColors();
- // TODO: Would it be possible to have this done by default so our tests can be more consistent with actual usage
- // where we expect this to default happen?
-
std::string destination = "";
if(argc > 1) {
@@ -346,9 +340,8 @@ int main(int argc, char** argv) {
Destination cliDestination = handleDestinationResolution(destination, true);
- // TODO: Refactor to switch statement
if(cliDestination.t != NO_DESTINATION) {
- assert(cliDestination.t == STRING_DESTINATION);
+ assert(cliDestination.t == STRING_DESTINATION); // we don't allow numeric link following on startup.
b.goToSite(cliDestination.destination);
}
@@ -438,7 +431,7 @@ int main(int argc, char** argv) {
if(clk != nullptr) {
ds.header = clk->getLinkDestination().to_string();
} else {
- ds.header = "Welcome!";
+ ds.header = "gem-browser";
}
auto* st = b.getCurrentSite();
diff --git a/tests/pure-test.cpp b/tests/pure-test.cpp
@@ -59,7 +59,6 @@ TEST_CASE("Test user input handling for destinations") {
REQUIRE(handleDestinationResolution("file:///test/whatever", false).t == STRING_DESTINATION);
REQUIRE(handleDestinationResolution("gemini://test.com", false).destination == "gemini://test.com");
- // TODO: Should this return a string destination or should it just return something like LOOKUP?
REQUIRE(handleDestinationResolution("what is the capital of scotland?", false).destination == "gemini://tlgs.one/search?" + urlEncode("what is the capital of scotland?"));
REQUIRE(handleDestinationResolution("laack.co", false).destination == "gemini://laack.co");