Expand LinuxCNC interpreter regression coverage

This commit is contained in:
2026-06-09 14:54:54 +08:00
parent 50757e45ba
commit 5bd8f12872
143 changed files with 10895 additions and 219 deletions

View File

@@ -24,6 +24,22 @@ if [[ ! -f "$MANIFEST_FILE" ]]; then
exit 1
fi
validate_manifest_path() {
local src_rel="$1"
if [[ "$src_rel" = /* || "$src_rel" == */ || "$src_rel" == *"//"* ]]; then
return 1
fi
local component
local -a path_components
IFS=/ read -r -a path_components <<< "$src_rel"
for component in "${path_components[@]}"; do
if [[ -z "$component" || "$component" == "." || "$component" == ".." ]]; then
return 1
fi
done
}
mkdir -p "$BUILD_DIR"
vendor_sync_fingerprint() {
@@ -65,7 +81,7 @@ while IFS= read -r src_rel; do
[[ -z "$src_rel" ]] && continue
[[ "${src_rel:0:1}" == "#" ]] && continue
if [[ "$src_rel" = /* || "$src_rel" == *".."* ]]; then
if ! validate_manifest_path "$src_rel"; then
echo "invalid manifest path: $src_rel" >&2
exit 1
fi