test: Update 13 files
Some checks failed
Build-Test-Publish / build (linux/amd64) (push) Successful in 54s
Build-Test-Publish / test-install-from-scratch (linux/amd64) (push) Has been cancelled
Build-Test-Publish / test-install-from-scratch (linux/arm64) (push) Has been cancelled
Build-Test-Publish / build (linux/arm64) (push) Has been cancelled

This commit is contained in:
Your Name
2025-07-20 13:49:08 +12:00
parent 0ba6227412
commit 1b03087c02
16 changed files with 250 additions and 29 deletions

49
test_gp_deleted_files.sh Executable file
View File

@ -0,0 +1,49 @@
#!/bin/bash
# Test script to verify gp properly shows deleted files as deleted
set -euo pipefail
echo "Testing gp deleted files functionality..."
# Create a temporary test directory
TEST_DIR="test_gp_$(date +%s)"
mkdir "$TEST_DIR"
cd "$TEST_DIR"
# Initialize git repo
git init
git config user.email "test@example.com"
git config user.name "Test User"
# Create some test files
echo "content1" > file1.txt
echo "content2" > file2.txt
echo "content3" > file3.txt
mkdir test_dir
echo "test content" > test_dir/test_file.txt
# Add and commit initial files
git add .
git commit -m "Initial commit"
# Now delete some files to simulate the scenario
rm file2.txt
rm -rf test_dir
echo "modified content" > file1.txt
echo "new content" > new_file.txt
# Test the gp script with dry-run to see the output
echo ""
echo "=== Testing gp --dry-run output ==="
echo ""
# Run gp with dry-run to see how it categorizes the files
../gp/gp --dry-run
# Cleanup
cd ..
rm -rf "$TEST_DIR"
echo ""
echo "Test completed!"