feat(test): tmux test now working

This commit is contained in:
Raphael 2025-05-12 15:26:15 +02:00
parent 9831101cde
commit 316dd1fde4
2 changed files with 18 additions and 2 deletions

View file

@ -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)

16
sources/core/main.cpp Normal file
View file

@ -0,0 +1,16 @@
#include <iostream>
#include "core.hpp"
int main(int argc, char *argv[]) {
if (argc != 3) {
std::cerr << CLR_RED << "Usage: " << argv[0] << " <port> <password>" << 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;
}