Fix exclude patterns test to properly verify directory content exclusion

This commit is contained in:
Leopere 2025-03-24 15:42:42 -04:00
parent fdc692c90c
commit d34522725d
1 changed files with 3 additions and 3 deletions

View File

@ -237,11 +237,11 @@ run_exclude_patterns_test() {
echo "Total files: $(find /tmp/exclude-extracted/test2 -type f | wc -l)"
# Check that the excluded directories don't exist in the extracted archive
EXCLUDED_DIRS=$(find /tmp/exclude-extracted/test2 -path "*/temp" -o -path "*/bin" | wc -l)
EXCLUDED_DIRS=$(find /tmp/exclude-extracted/test2 -path "*/temp/*" -o -path "*/bin/*" | wc -l)
if [ "$EXCLUDED_DIRS" -eq 0 ]; then
echo "SUCCESS: No temp/ or bin/ directories found in the extracted archive"
echo "SUCCESS: No contents of temp/ or bin/ directories found in the extracted archive"
else
echo "ERROR: Found excluded directories in the extracted archive"
echo "ERROR: Found contents of excluded directories in the extracted archive"
return 1
fi