From 2f08f37860e3fa3a4b46af8f1985873f32f488a3 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Fri, 11 Oct 2024 23:21:55 -0500 Subject: [PATCH] Bugfix: Empty Objects are preserving leading white space when in original mode for Payload. The functionality already exists. The test is failing. Add the missing `fss_read_feature_flag_object_align_d` feature flag to the Payload. Update the unit test to properly reflect this. --- level_3/fss_read/c/main/main.c | 4 ++-- level_3/fss_read/c/payload/main.c | 2 +- ...ct_space-object_and_content-select-0-original.expect | Bin 272 -> 275 bytes 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/level_3/fss_read/c/main/main.c b/level_3/fss_read/c/main/main.c index 9d8d532..89f3d76 100644 --- a/level_3/fss_read/c/main/main.c +++ b/level_3/fss_read/c/main/main.c @@ -342,12 +342,12 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) { main->setting.feature &= ~fss_read_feature_flag_content_has_close_d; main->setting.feature &= ~fss_read_feature_flag_content_multiple_d; main->setting.feature &= ~fss_read_feature_flag_depth_multiple_d; - main->setting.feature &= ~fss_read_feature_flag_object_align_d; main->setting.feature &= ~fss_read_feature_flag_line_single_d; main->setting.feature &= ~fss_read_feature_flag_quote_content_d; main->setting.feature &= ~fss_read_feature_flag_quote_object_d; - main->setting.feature |= fss_read_feature_flag_object_as_line_d | fss_read_feature_flag_object_trim_d | fss_read_feature_flag_object_trim_expand_d; + main->setting.feature |= fss_read_feature_flag_object_as_line_d | fss_read_feature_flag_object_align_d; + main->setting.feature |= fss_read_feature_flag_object_trim_d | fss_read_feature_flag_object_trim_expand_d; main->setting.flag |= fss_read_main_flag_payload_error_d; main->program.parameters.array[fss_read_parameter_payload_e].flag &= ~f_console_flag_disable_e; diff --git a/level_3/fss_read/c/payload/main.c b/level_3/fss_read/c/payload/main.c index e5d06a0..7dc457e 100644 --- a/level_3/fss_read/c/payload/main.c +++ b/level_3/fss_read/c/payload/main.c @@ -17,7 +17,7 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) { data.program.output.custom = (void *) &data; data.program.warning.custom = (void *) &data; - data.setting.feature |= fss_read_feature_flag_object_as_line_d; + data.setting.feature |= fss_read_feature_flag_object_as_line_d | fss_read_feature_flag_object_align_d; data.setting.feature |= fss_read_feature_flag_object_trim_d | fss_read_feature_flag_object_trim_expand_d; data.setting.state.custom = (void *) &data; diff --git a/level_3/fss_read/tests/runtime/fss_000e/expect/test-0003-object_space-object_and_content-select-0-original.expect b/level_3/fss_read/tests/runtime/fss_000e/expect/test-0003-object_space-object_and_content-select-0-original.expect index a611209e6c1444155dbdd134b4ece592f846700a..bd8dd2b4c45588681f097f72d8a37c2583f4aa22 100644 GIT binary patch delta 13 UcmbQhG?{5a53_=T!o;2y03414NB{r; delta 9 QcmbQtG=XVC&&2)~01=e~=l}o! -- 1.8.3.1