24#include <catch2/catch.hpp>
30TEST_CASE(
"nawa::utils functions",
"[unit][utils]") {
32 SECTION(
"Time conversions") {
33 time_t currentTime = time(
nullptr);
39 SECTION(
"Path splitting") {
40 string t1 =
"p1/p2/p3";
41 string t2 =
"/p1/p2/p3";
42 string t3 =
"/p1/p2/p3/";
43 string t4 =
"/p1/p2/p3?test=/xyz";
44 string t5 =
"/p1/p2/p3/?test=/xyz/";
time_t readSmtpTime(std::string const &smtpTime)
time_t readHttpTime(std::string const &httpTime)
std::vector< std::string > splitPath(std::string const &pathString)
std::string makeHttpTime(time_t time)
std::string makeSmtpTime(time_t time)
TEST_CASE("nawa::utils functions", "[unit][utils]")
Contains useful functions that improve the readability and facilitate maintenance of the NAWA code.