Compare commits
2 Commits
v2025.0720
...
v2025.0720
Author | SHA1 | Date | |
---|---|---|---|
6a3ca6bc10 | |||
7f8312ed59 |
Submodule test_gp_1752976117 deleted from df17a83889
@ -1,49 +0,0 @@
|
|||||||
#!/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!"
|
|
Reference in New Issue
Block a user