I found this aux file (and its associated main test file) really awkward to change, because the in-source BOM marker and CRLF line endings are load-bearing. Apparently the byte offsets are, too. Probably use a run-make test instead to "craft" a BOM + CRLF auxiliary instead to:
- Make it possible to adjust the auxiliary without accidentally regressing the test intention.
- Have some checks that the auxiliary actually has the BOM marker + CRLF line endings.
That test directory uses .gitattributes to help enforce CRLF line endings, which is clever, but also...
|
// (This line has BOM so it's ignored by compiletest for directives) |
|
// |
|
//@ ignore-test Not a test. Used by other tests |
|
// ignore-tidy-cr |
|
|
|
// For easier verifying, the byte offsets in this file should match those |
|
// in the json-bom-plus-crlf.rs - given the actual fn is identical (just with |
|
// a different, but equally sized name), the easiest way to do this is to |
|
// ensure the two files are of equal size on disk. |
|
// Padding............................ |
|
|
|
// N.B., this file needs CRLF line endings. The .gitattributes file in |
|
// this directory should enforce it. |
I found this aux file (and its associated main test file) really awkward to change, because the in-source BOM marker and CRLF line endings are load-bearing. Apparently the byte offsets are, too. Probably use a
run-maketest instead to "craft" a BOM + CRLF auxiliary instead to:That test directory uses
.gitattributesto help enforce CRLF line endings, which is clever, but also...rust/tests/ui/json/json-bom-plus-crlf-multifile-aux.rs
Lines 1 to 13 in 15c4cce