mirror of
https://github.com/keith/swift.vim.git
synced 2025-12-12 20:35:53 +01:00
19 lines
356 B
Bash
Executable File
19 lines
356 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -euo pipefail
|
|
|
|
tempdir=$(mktemp -d)
|
|
trap cleanup EXIT
|
|
|
|
cleanup() {
|
|
rm -r "$tempdir"
|
|
}
|
|
|
|
for example_file in example/*.swift; do
|
|
autoindented_file="$tempdir/${example_file##*/}"
|
|
OUTPUT_FILE="$autoindented_file" vim -u autoindent.vim "$example_file"
|
|
diff -u --color=auto "$example_file" "$autoindented_file"
|
|
done
|
|
|
|
echo "test passed!"
|