mirror of
https://github.com/dlang-community/dfmt.git
synced 2025-04-25 21:00:03 +03:00
Fix #127
This commit is contained in:
parent
3d4d4d05f9
commit
bcc4adb7cc
5 changed files with 17 additions and 1 deletions
|
@ -474,6 +474,8 @@ private:
|
|||
{
|
||||
writeToken();
|
||||
linebreakHints = [];
|
||||
while (indents.topIs(tok!"enum"))
|
||||
indents.pop();
|
||||
newline();
|
||||
}
|
||||
}
|
||||
|
|
4
tests/allman/issue0127.d.ref
Normal file
4
tests/allman/issue0127.d.ref
Normal file
|
@ -0,0 +1,4 @@
|
|||
version (Windows)
|
||||
enum root = `C:\`;
|
||||
else
|
||||
enum root = "/";
|
4
tests/issue0127.d
Normal file
4
tests/issue0127.d
Normal file
|
@ -0,0 +1,4 @@
|
|||
version (Windows)
|
||||
enum root = `C:\`;
|
||||
else
|
||||
enum root = "/";
|
4
tests/otbs/issue0127.d.ref
Normal file
4
tests/otbs/issue0127.d.ref
Normal file
|
@ -0,0 +1,4 @@
|
|||
version (Windows)
|
||||
enum root = `C:\`;
|
||||
else
|
||||
enum root = "/";
|
|
@ -6,9 +6,11 @@ do
|
|||
for source in *.d
|
||||
do
|
||||
echo "${source}.ref" "${braceStyle}/${source}.out"
|
||||
argsFile=$(basename ${source}).args
|
||||
argsFile=$(basename ${source} .d).args
|
||||
if [ -e ${argsFile} ]; then
|
||||
args=$(cat ${argsFile})
|
||||
else
|
||||
args=
|
||||
fi
|
||||
../bin/dfmt --brace_style=${braceStyle} ${args} "${source}" > "${braceStyle}/${source}.out"
|
||||
diff -u "${braceStyle}/${source}.ref" "${braceStyle}/${source}.out"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue