jw-python/test
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jan Lindemann e6f3833716
load_yaml: Fix include spec parsing of pipes
_INCLUDE_PATH_RE allows the pipe character in the target-path part of
a jw.include spec such as 'target.path|file.yaml'.  The greedy match
then consumes further pipes, so a file name that itself contains a
pipe is misparsed: the target swallows part of the file name and the
remainder becomes the (nonexistent) file to open.  Dots are needed in
the target part for nested paths, but a pipe can never be part of a
target path.

Drop the pipe from the character class so that the first pipe always
separates the target path from the file name.  Add a regression test
with a pipe in the file name.

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-08-25 19:35:02 +02:00
..
cast test: Fix MyPy errors 2026-08-12 23:10:12 +00:00
parse_opts test: Fix MyPy errors 2026-08-12 23:10:12 +00:00
trim_src test: Fix MyPy errors 2026-08-12 23:10:12 +00:00
unit load_yaml: Fix include spec parsing of pipes 2026-08-25 19:35:02 +02:00
__init__.py stree.StringTree: Add unit tests 2026-08-12 23:10:12 +00:00
Makefile stree.StringTree: Add unit tests 2026-08-12 23:10:12 +00:00