Consider converting tests/ui/json/json-bom-plus-crlf-multifile-aux.rs
-associated tests into a run-make
tests · Issue #139968 · rust-lang/rust (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Description
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. |