The files below have been synced by Tortoise as CRLF, and it looks like they are like that in the depot as well (I'm still using the SVN setup)
Strangely svn diff shows them as LF.
The issue is that grep 'something$' doesn't match the newline inside the MINGW32 bash (mintty).
Details
- Reviewers
rnk jlebar lebedev.ri - Commits
- rZORG34ca815f930a: Fixed tests where grep was not matching the linefeed
rZORG47e14a95d0c5: Fixed tests where grep was not matching the linefeed
rG34ca815f930a: Fixed tests where grep was not matching the linefeed
rG47e14a95d0c5: Fixed tests where grep was not matching the linefeed
rG904a3e51839d: Fixed tests where grep was not matching the linefeed
rL360467: Fixed tests where grep was not matching the linefeed
rC360467: Fixed tests where grep was not matching the linefeed
Diff Detail
- Repository
- rC Clang
Event Timeline
Checked-in files should not have CRLF endings, in general (there are a very few exceptions, and these aren't among them).
If the checked-in files have LF endings but your tool checks them out with CRLF then that is a problem with your config, or with the tool.
Adding dos2unix to the RUN lines is the wrong fix, either way.
Yeah I've realized that :) This is caused by svn on Windows which sets svn:eol-style=native by default, which causes local files to be saved in the "native" format, which is CRLF on Windows (even though in upstream they are LF) When files are commited, normally svn should convert them back to LF (or at least that's the contract for svn:eol-style=native).
native This causes the file to contain the EOL markers that are native to the operating system on which Subversion was run. In other words, if a user on a Windows machine checks out a working copy that contains a file with an svn:eol-style property set to native, that file will contain CRLF EOL markers. A Unix user checking out a working copy that contains the same file will see LF EOL markers in his copy of the file. Note that Subversion will actually store the file in the repository using normalized LF EOL markers regardless of the operating system. This is basically transparent to the user, though.
I'm using the MINGW32 bash to run the tests/check-all because it comes with all the Unix tools (grep, sed, ...) that Windows doesn't have.
The bug here is that the GNU grep only matches LF, not CRLF.
Sure, this looks better.
clang/trunk/test/Preprocessor/indent_macro.c | ||
---|---|---|
1–2 ↗ | (On Diff #197990) | Separate with newline |
clang/trunk/test/Preprocessor/macro_fn_varargs_named.c | ||
1–6 ↗ | (On Diff #197990) | // RUN: %clang_cc1 -E %s | FileCheck %s --match-full-lines --strict-whitespace --check-prefix CHECK-1 // RUN: %clang_cc1 -E %s | FileCheck %s --match-full-lines --strict-whitespace --check-prefix CHECK-2 // RUN: %clang_cc1 -E %s | FileCheck %s --match-full-lines --strict-whitespace --check-prefix CHECK-3 // CHECK-1:a: x // CHECK-2:b: x y, z,h // CHECK-3:c: foo(x) |
clang/trunk/test/Preprocessor/indent_macro.c | ||
---|---|---|
1–2 ↗ | (On Diff #197990) | What do you mean? Between RUN and CHECK? There's already a newline a L3. |