Add extension normalization command

This commit is contained in:
Rogee
2025-10-30 10:31:53 +08:00
parent f66c59fd57
commit 6a353b5086
35 changed files with 2306 additions and 2 deletions

21
testdata/extension/README.md vendored Normal file
View File

@@ -0,0 +1,21 @@
# Extension Command Test Data
This directory contains sample files for manual and automated validation of the
`renamer extension` workflow. To avoid mutating source fixtures directly, copy
the `sample/` folder to a temporary location before running commands that
perform real filesystem changes.
Example usage:
```bash
TMP_DIR=$(mktemp -d)
cp -R testdata/extension/sample/* "$TMP_DIR/"
go run ./main.go extension .jpeg .JPG .jpg --path "$TMP_DIR" --dry-run
```
The sample set includes:
- Mixed-case `.jpeg`/`.JPG` extensions
- Nested directories (`sample/nested`)
- An already-normalized `.jpg` file
- A hidden file to verify `--hidden` opt-in behavior

1
testdata/extension/sample/.hidden.JPG vendored Normal file
View File

@@ -0,0 +1 @@
hidden sample

View File

@@ -0,0 +1 @@
sample jpeg placeholder

View File

@@ -0,0 +1 @@
second sample

1
testdata/extension/sample/logo.jpg vendored Normal file
View File

@@ -0,0 +1 @@
already normalized

View File

@@ -0,0 +1 @@
nested sample