1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-02 15:53:12 +02:00

core: split WeeChat home in 4 directories, use XDG directories by default (issue #1285)

The 4 directories (which can be the same):

- config: configuration files, certificates
- data: log/upgrade files, local plugins, scripts, xfer files
- cache: script repository, scripts downloaded (temporary location)
- runtime: FIFO pipe, relay UNIX sockets
This commit is contained in:
Sébastien Helleu
2021-05-02 11:56:25 +02:00
parent 4c5fcb743b
commit 0f9640a5f3
38 changed files with 1129 additions and 363 deletions
+85 -2
View File
@@ -35,6 +35,16 @@ TEST_GROUP(CoreDir)
{
};
/*
* Tests functions:
* dir_get_temp_dir
*/
TEST(CoreDir, GetTempDir)
{
/* TODO: write tests */
}
/*
* Tests functions:
* dir_mkdir_home
@@ -47,6 +57,16 @@ TEST(CoreDir, Mkdir)
/* TODO: write tests */
}
/*
* Tests functions:
* dir_rmtree
*/
TEST(CoreDir, Rmtree)
{
/* TODO: write tests */
}
/*
* Tests functions:
* dir_exec_on_files
@@ -62,7 +82,7 @@ TEST(CoreDir, ExecOnFiles)
* dir_search_full_lib_name
*/
TEST(CoreDir, LibName)
TEST(CoreDir, SearchFullLibName)
{
/* TODO: write tests */
}
@@ -84,7 +104,8 @@ TEST(CoreDir, FileGetContent)
POINTERS_EQUAL(NULL, dir_file_get_content (""));
POINTERS_EQUAL(NULL, dir_file_get_content ("/tmp/does/not/exist.xyz"));
path = string_eval_path_home ("%h/test_file.txt", NULL, NULL, NULL);
path = string_eval_path_home ("${weechat_data_dir}/test_file.txt",
NULL, NULL, NULL);
/* small file */
length = strlen (content_small);
@@ -125,6 +146,37 @@ TEST(CoreDir, FileGetContent)
TEST(CoreDir, SetHomePath)
{
/* TODO: write tests */
}
/*
* Tests functions:
* dir_create_home_temp_dir
*/
TEST(CoreDir, CreateHomeTempDir)
{
/* TODO: write tests */
}
/*
* Tests functions:
* dir_find_xdg_dirs
*/
TEST(CoreDir, FindXdgDirs)
{
/* TODO: write tests */
}
/*
* Tests functions:
* dir_find_home_dirs
*/
TEST(CoreDir, FindHomeDirs)
{
/* TODO: write tests */
}
/*
@@ -134,4 +186,35 @@ TEST(CoreDir, SetHomePath)
TEST(CoreDir, CreateHomeDir)
{
/* TODO: write tests */
}
/*
* Tests functions:
* dir_create_home_dirs
*/
TEST(CoreDir, CreateHomeDirs)
{
/* TODO: write tests */
}
/*
* Tests functions:
* dir_remove_home_dirs
*/
TEST(CoreDir, RemoveHomeDirs)
{
/* TODO: write tests */
}
/*
* Tests functions:
* dir_get_string_home_dirs
*/
TEST(CoreDir, GetStringHomeDirs)
{
/* TODO: write tests */
}