From 316dd1fde4cee3f27f1bde8fc4700bb9b718fb49 Mon Sep 17 00:00:00 2001 From: Raphael Date: Mon, 12 May 2025 15:26:15 +0200 Subject: [PATCH] feat(test): tmux test now working --- Makefile | 4 ++-- sources/core/main.cpp | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 sources/core/main.cpp diff --git a/Makefile b/Makefile index 8c448d3..50b97a2 100644 --- a/Makefile +++ b/Makefile @@ -92,9 +92,9 @@ test: debug fi @tmux new-session -d -s $(SESSION) \ 'bash -lc "./$(NAME) 4243 irc; exec bash"' - @tmux split-window -h -p 70 -t $(SESSION):1 \ + @tmux split-window -h -p 70 -t $(SESSION):0 \ 'bash -lc "irssi 4243 irc --color=on; exec yes irssi"' - @tmux split-window -v -p 50 -t $(SESSION):1.2 \ + @tmux split-window -v -p 50 -t $(SESSION):0.1 \ 'bash -lc "nc localhost 4243; exec yes netcat"' @tmux attach -t $(SESSION) diff --git a/sources/core/main.cpp b/sources/core/main.cpp new file mode 100644 index 0000000..79690cb --- /dev/null +++ b/sources/core/main.cpp @@ -0,0 +1,16 @@ +#include +#include "core.hpp" + +int main(int argc, char *argv[]) { + if (argc != 3) { + std::cerr << CLR_RED << "Usage: " << argv[0] << " " << CLR_RESET << std::endl; + return 1; + } + if (DEBUG) { + std::cout << CLR_GREY << "Port:\t\t" << CLR_GREEN << argv[1] << CLR_RESET << std::endl; + std::cout << CLR_GREY << "Password:\t" << CLR_GREEN << argv[2] << CLR_RESET << std::endl; + } + while (1) + ; + return 0; +}