Merge remote-tracking branch 'origin/feat/update' into dev

# Conflicts:
#	src/client/client_cli.c
#	src/client/usage.c
#	src/shared/file.c
#	src/shared/file.h
#	src/shared/file_receive.c
#	tests/test_client_cli.c
This commit is contained in:
2026-09-04 17:44:07 +02:00
7 changed files with 155 additions and 29 deletions
+15 -2
View File
@@ -394,8 +394,6 @@ static void test_parse_args_rejects_unimplemented_options() {
"--out-format",
"--info",
"--list-only",
"-u",
"--update",
"--append",
"--append-verify",
"--delete-excluded",
@@ -465,6 +463,20 @@ static void test_parse_args_human_readable() {
}
}
static void test_parse_args_update() {
Config* cfg = config_create();
char* argv[] = {"fastsync", "-u", "/src", "/dst"};
int positional_args[2];
int positional_count = 0;
EXPECT_EQ_INT(parse_args(cfg, 4, argv, positional_args, &positional_count), 0);
EXPECT_TRUE(cfg->update);
EXPECT_TRUE(cfg->use_metadata);
EXPECT_EQ_INT(positional_count, 2);
config_delete(cfg);
}
/* Test parse_args with --archive flag */
static void test_parse_args_archive() {
Config* cfg = config_create();
@@ -634,6 +646,7 @@ void test_client_cli() {
test_parse_args_rejects_unimplemented_options();
test_parse_args_quiet();
test_parse_args_human_readable();
test_parse_args_update();
test_parse_args_archive();
test_parse_args_fsync();
test_parse_args_ignore_times();