Merge remote-tracking branch 'origin/feat/human-readable' into dev
# Conflicts: # RSYNC_COMPAT.md # src/client/client_send.c # tests/test_client_cli.c
This commit is contained in:
+15
-2
@@ -299,8 +299,6 @@ static void test_parse_args_rejects_unimplemented_options() {
|
||||
"--info",
|
||||
"--debug",
|
||||
"--list-only",
|
||||
"-h",
|
||||
"--human-readable",
|
||||
"-u",
|
||||
"--update",
|
||||
"--append",
|
||||
@@ -358,6 +356,20 @@ static void test_parse_args_quiet() {
|
||||
}
|
||||
}
|
||||
|
||||
static void test_parse_args_human_readable() {
|
||||
static const char* const options[] = {"-h", "--human-readable"};
|
||||
for (size_t i = 0; i < sizeof(options) / sizeof(options[0]); i++) {
|
||||
Config* cfg = config_create();
|
||||
char* argv[] = {"fastsync", (char*)options[i], "/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->human_readable);
|
||||
config_delete(cfg);
|
||||
}
|
||||
}
|
||||
|
||||
/* Test parse_args with --archive flag */
|
||||
static void test_parse_args_archive() {
|
||||
Config* cfg = config_create();
|
||||
@@ -408,6 +420,7 @@ void test_client_cli() {
|
||||
test_parse_args_unknown_option();
|
||||
test_parse_args_rejects_unimplemented_options();
|
||||
test_parse_args_quiet();
|
||||
test_parse_args_human_readable();
|
||||
test_parse_args_archive();
|
||||
test_parse_args_fsync();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user