Follow up to #190 for render_list (#417)

* Fixed `render_list` build needs `libm`
* Added tests
* Updated man page
* Created function to set double
* Cleaned up / optimized a bit
* Removed `--dont-render` option
This commit is contained in:
Hummeltech
2024-03-21 13:22:02 -07:00
committed by GitHub
parent 3621428efd
commit 743cf651b1
11 changed files with 376 additions and 101 deletions

View File

@ -193,7 +193,7 @@ TEST_CASE("render_expired specific", "specific testing")
}
}
TEST_CASE("render_expired generator", "generator testing")
TEST_CASE("render_expired min/max int generator", "min/max int generator testing")
{
std::string option = GENERATE("--delete-from", "--max-load", "--max-zoom", "--min-zoom", "--num-threads", "--touch-from");
@ -223,4 +223,13 @@ TEST_CASE("render_expired generator", "generator testing")
int status = pclose(pipe);
REQUIRE(WEXITSTATUS(status) == 1);
}
SECTION("option is not an integer", "should return 1") {
std::string command = test_binary + " " + option + " invalid";
// flawfinder: ignore
FILE *pipe = popen(command.c_str(), "r");
int status = pclose(pipe);
REQUIRE(WEXITSTATUS(status) == 1);
}
}