test: Update 2 files
Some checks failed
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/amd64) (push) Has been cancelled
Build-Test-Publish / build (linux/arm64) (push) Has been cancelled
Some checks failed
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/amd64) (push) Has been cancelled
Build-Test-Publish / build (linux/arm64) (push) Has been cancelled
This commit is contained in:
@ -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