Skip to content

Commit 44c73f0

Browse files
committed
Fix Travis Windows UI tests
Just using `dos2unix tests/ui/**/*` did not work because the tool was only transforming the first directory. That's the reason for using `find`. Interestingly `find` has precedence rules for its operators, too. So you have to be careful to add opening/closing braces to denote the precedence. Example: ```shell find tests/ui/* -name '*.rs' -or -name '*.stderr' -exec dos2unix '{}' + ``` The above will be interpreted like this: (find files matching `*.rs`) OR (find files matching `*.stderr` AND exec dos2unix) which would only execute over the stderr files. That's why the braces are needed: ```shell find tests/ui/* \( -name '*.rs' -or -name '*.stderr' -or -name '*.stdout' \) -exec dos2unix '{}' + ```
1 parent 3bb8877 commit 44c73f0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ install:
4040
fi
4141
if [ "$TRAVIS_OS_NAME" == "windows" ]; then
4242
choco install windows-sdk-10.0
43+
find tests/ui/* \( -name '*.rs' -or -name '*.stderr' -or -name '*.stdout' \) -exec dos2unix '{}' +
4344
fi
4445
fi
4546

0 commit comments

Comments
 (0)