cmds.projects.lib.templates: merge_values(): Don't split strings
is_list_dict() accepts a string value as a list-dict value, and render_values_to_list_dict() passes such values through unchanged. merge_values() then merges them with list extension, and [] += 'xyz' appends the individual characters, so every string value ends up as a list of its characters. Normalize string values to single-element lists in render_values_to_list_dict(), so that merge_values() appends whole values. jw-pkg projects create-pkg-config is hit by this, because all of its values are strings: the generated file contains one line per character. The code path was just never exercised lately. Add unit tests for the value layout guards, the normalization, and the merging of the three supported layouts. Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v0.84.2 Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
2b951f7861
commit
955fb8101b
6 changed files with 103 additions and 5 deletions
4
test/unit/python/jw/pkg/cmds/projects/Makefile
Normal file
4
test/unit/python/jw/pkg/cmds/projects/Makefile
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
TOPDIR = ../../../../../../..
|
||||
|
||||
include $(TOPDIR)/make/proj.mk
|
||||
include $(JWBDIR)/make/dirs.mk
|
||||
Loading…
Reference in a new issue