mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 05:35:49 -04:00
allow directories containing periods in file extension grabber
This commit is contained in:
parent
62708ab3ad
commit
4c7876beb9
2 changed files with 19 additions and 3 deletions
|
|
@ -12,6 +12,8 @@ TEST_CASE("Test get_file_extension")
|
|||
REQUIRE(get_file_extension("wasssssup_lol") == "");
|
||||
REQUIRE(get_file_extension("has_directory/secret_file") == "");
|
||||
REQUIRE(get_file_extension("lovely.dir/extensionless_file") == "");
|
||||
REQUIRE(get_file_extension("lovely.dir/statepoint.20.h5") == "h5");
|
||||
REQUIRE(get_file_extension("lovely.dir/asdf123.cpp") == "cpp");
|
||||
}
|
||||
|
||||
TEST_CASE("Test dir_exists")
|
||||
|
|
@ -25,5 +27,6 @@ TEST_CASE("Test dir_exists")
|
|||
|
||||
TEST_CASE("Test file_exists")
|
||||
{
|
||||
// TODO make a file test it exists, delete it
|
||||
// Note: not clear how to portably test where a file should exist.
|
||||
REQUIRE(!file_exists("./should_not_exist/really_do_not_make_this_please"));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue