]> Kevux Git Server - fll/commitdiff
Bugfix: Empty Objects are preserving leading white space when in original mode for...
authorKevin Day <Kevin@kevux.org>
Sat, 12 Oct 2024 04:21:55 +0000 (23:21 -0500)
committerKevin Day <Kevin@kevux.org>
Sat, 12 Oct 2024 05:25:08 +0000 (00:25 -0500)
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
level_3/fss_read/c/payload/main.c
level_3/fss_read/tests/runtime/fss_000e/expect/test-0003-object_space-object_and_content-select-0-original.expect

index 9d8d532a54dd1593905ae26275987dd0cda31f9f..89f3d76f9008cdd41cdd1f2ee51b45a009547a6b 100644 (file)
@@ -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;
index e5d06a0a989eff4d789e0094736c97f170676ba8..7dc457e99c5cdd54b5c3605fe2d673a0cbcf239c 100644 (file)
@@ -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;
index a611209e6c1444155dbdd134b4ece592f846700a..bd8dd2b4c45588681f097f72d8a37c2583f4aa22 100644 (file)
Binary files a/level_3/fss_read/tests/runtime/fss_000e/expect/test-0003-object_space-object_and_content-select-0-original.expect and b/level_3/fss_read/tests/runtime/fss_000e/expect/test-0003-object_space-object_and_content-select-0-original.expect differ