jw-pkg/test/unit/python/jw/pkg/cmds
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jan Lindemann 955fb8101b
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>
2026-09-13 21:08:53 +02:00
..
projects cmds.projects.lib.templates: merge_values(): Don't split strings 2026-09-13 21:08:53 +02:00
Makefile cmds.projects.lib.templates: merge_values(): Don't split strings 2026-09-13 21:08:53 +02:00