From f8a273ec842e9e11b2a259a3546664b1512e263e Mon Sep 17 00:00:00 2001 From: whaffman Date: Fri, 10 Oct 2025 07:56:49 +0200 Subject: [PATCH] moving docs, log files and iwyu map --- Makefile.old => docs/Makefile.old | 0 TESTING_SETUP.md => docs/TESTING_SETUP.md | 0 test_log.log => logs/test_log.log | 0 .iwyu.imp => scripts/.iwyu.imp | 0 scripts/check_iwyu.sh | 2 +- tests/log/test_log.cpp | 4 ++-- webserv/main.cpp | 2 +- 7 files changed, 4 insertions(+), 4 deletions(-) rename Makefile.old => docs/Makefile.old (100%) rename TESTING_SETUP.md => docs/TESTING_SETUP.md (100%) rename test_log.log => logs/test_log.log (100%) rename .iwyu.imp => scripts/.iwyu.imp (100%) diff --git a/Makefile.old b/docs/Makefile.old similarity index 100% rename from Makefile.old rename to docs/Makefile.old diff --git a/TESTING_SETUP.md b/docs/TESTING_SETUP.md similarity index 100% rename from TESTING_SETUP.md rename to docs/TESTING_SETUP.md diff --git a/test_log.log b/logs/test_log.log similarity index 100% rename from test_log.log rename to logs/test_log.log diff --git a/.iwyu.imp b/scripts/.iwyu.imp similarity index 100% rename from .iwyu.imp rename to scripts/.iwyu.imp diff --git a/scripts/check_iwyu.sh b/scripts/check_iwyu.sh index a885ec4..34c8fe7 100755 --- a/scripts/check_iwyu.sh +++ b/scripts/check_iwyu.sh @@ -21,7 +21,7 @@ for build_candidate in "$PROJECT_ROOT/build-container" "$PROJECT_ROOT/build-loca fi done -IWYU_MAPPING="$PROJECT_ROOT/.iwyu.imp" +IWYU_MAPPING="$PROJECT_ROOT/scripts/.iwyu.imp" # Colors for output RED='\033[0;31m' diff --git a/tests/log/test_log.cpp b/tests/log/test_log.cpp index 37e59d1..dc369f3 100644 --- a/tests/log/test_log.cpp +++ b/tests/log/test_log.cpp @@ -122,9 +122,9 @@ TEST_F(LogTest, SetStdoutChannel) TEST_F(LogTest, SetFileChannel) { - EXPECT_NO_THROW(Log::setFileChannel("test_log.log", std::ios_base::trunc)); + EXPECT_NO_THROW(Log::setFileChannel("logs/test_log.log", std::ios_base::trunc)); // Setting again to see if it handles multiple calls - EXPECT_NO_THROW(Log::setFileChannel("test_log.log", std::ios_base::app)); + EXPECT_NO_THROW(Log::setFileChannel("logs/test_log.log", std::ios_base::app)); } // Note: More comprehensive tests would involve checking actual log outputs, diff --git a/webserv/main.cpp b/webserv/main.cpp index ed2a042..dcd61d6 100644 --- a/webserv/main.cpp +++ b/webserv/main.cpp @@ -16,7 +16,7 @@ int main(int argc, char **argv) return 1; } - Log::setFileChannel("webserv.log", std::ios_base::trunc); + Log::setFileChannel("logs/webserv.log", std::ios_base::trunc); Log::setStdoutChannel(); Log::info("\n======================\nStarting webserv...\n======================\n");