Additional filesystem::get_wml_location() test cases
This commit is contained in:
parent
db0a663858
commit
b46027acde
1 changed files with 7 additions and 0 deletions
|
@ -158,10 +158,17 @@ BOOST_AUTO_TEST_CASE( test_fs_binary_path )
|
|||
|
||||
BOOST_AUTO_TEST_CASE( test_fs_wml_path )
|
||||
{
|
||||
const std::string& userdata = get_user_data_dir();
|
||||
|
||||
BOOST_CHECK_EQUAL( get_wml_location(""), "" );
|
||||
|
||||
BOOST_CHECK_EQUAL( get_wml_location("_main.cfg"), gamedata + "/data/_main.cfg" );
|
||||
BOOST_CHECK_EQUAL( get_wml_location("core/_main.cfg"), gamedata + "/data/core/_main.cfg" );
|
||||
BOOST_CHECK_EQUAL( get_wml_location("."), gamedata + "/data/." );
|
||||
|
||||
BOOST_CHECK_EQUAL( get_wml_location("~"), userdata + "/data" );
|
||||
BOOST_CHECK_EQUAL( get_wml_location("~/"), userdata + "/data/" );
|
||||
|
||||
// Inexistent paths are resolved empty.
|
||||
BOOST_CHECK( get_wml_location("why_would_anyone_ever_name_a_file_like_this").empty() );
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue