#!/bin/bash # Test script to verify progress.sh fixes # Load the progress library source "$(dirname "$0")/progress.sh" echo "Testing progress.sh fixes..." # Test with valid numeric inputs echo "1. Testing with valid numeric inputs:" progress_bar 5 10 "Test Progress" "working..." echo "" # Test with invalid inputs (should not cause errors) echo "2. Testing with invalid inputs (should be handled gracefully):" progress_bar "/path/to/file.zip" "/another/path" "Test Progress" "should skip" echo "" # Test batch progress echo "3. Testing batch progress:" progress_batch_start "Test Batch" 3 progress_batch_update "item1.zip" "success" progress_batch_update "/path/with spaces/item2.zip" "success" progress_batch_update "item3" "processing" progress_batch_finish "completed" echo "" echo "✓ Progress tests completed successfully"