This commit is contained in:
parent
0622b250cc
commit
0a6efbded9
@ -39,6 +39,9 @@ cleanup() {
|
||||
trap cleanup EXIT
|
||||
|
||||
echo "Testing whatsdirty.sh configuration behavior..."
|
||||
echo "Working directory: $(pwd)"
|
||||
echo "Script path: $WHATSDIRTY_SCRIPT"
|
||||
echo "Config file: $CONFIG_FILE"
|
||||
echo
|
||||
|
||||
# Backup existing config if it exists
|
||||
@ -95,6 +98,7 @@ fi
|
||||
|
||||
# Test 4: Running with new directory should update config
|
||||
echo -e "\nTest 4: Run with different directory"
|
||||
# Use the parent directory (should exist)
|
||||
NEW_TEST_DIR="$SCRIPT_DIR/.."
|
||||
if [ -d "$NEW_TEST_DIR" ]; then
|
||||
CANONICAL_DIR=$(cd "$NEW_TEST_DIR" && pwd)
|
||||
@ -103,6 +107,8 @@ if [ -d "$NEW_TEST_DIR" ]; then
|
||||
print_test "Config updated with new directory" "PASS"
|
||||
else
|
||||
print_test "Config updated with new directory" "FAIL"
|
||||
echo " Expected: $CANONICAL_DIR"
|
||||
echo " Got: $(cat "$CONFIG_FILE" 2>/dev/null || echo "file not found")"
|
||||
fi
|
||||
else
|
||||
print_test "Config updated with new directory" "SKIP (test directory not found)"
|
||||
|
Loading…
x
Reference in New Issue
Block a user