dfmt/tests/test

17 lines
412 B
Bash
Executable File

#!/usr/bin/env bash
set -e
for braceStyle in allman otbs
do
for source in *.d
do
echo "${source}.ref" "${braceStyle}/${source}.out"
argsFile=$(basename ${source}).args
if [ -e ${argsFile} ]; then
args=$(cat ${argsFile})
fi
../bin/dfmt --brace_style=${braceStyle} ${args} "${source}" > "${braceStyle}/${source}.out"
diff -u "${braceStyle}/${source}.ref" "${braceStyle}/${source}.out"
done
done