Skip to content

Commit c51828a

Browse files
committed
tests: Normalize \r\n to \n in some run-make tests
The output is produced by printf from C code in these cases, and printf prints in text mode, which means `\n` will be printed as `\r\n` on Windows. In --bless mode the new output with `\r\n` will replace expected output in `tests/run-make/raw-dylib-*\output.txt` files, which use \n, always resulting in dirty files in the repo.
1 parent efb3f11 commit c51828a

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

tests/run-make/raw-dylib-c/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ else
1717
$(CC) "$(TMPDIR)"/extern_1.obj -shared -o "$(TMPDIR)"/extern_1.dll
1818
$(CC) "$(TMPDIR)"/extern_2.obj -shared -o "$(TMPDIR)"/extern_2.dll
1919
endif
20-
"$(TMPDIR)"/driver > "$(TMPDIR)"/output.txt
20+
"$(TMPDIR)"/driver | tr -d '\r' > "$(TMPDIR)"/output.txt
2121
"$(TMPDIR)"/raw_dylib_test_bin > "$(TMPDIR)"/output_bin.txt
2222

2323
ifdef RUSTC_BLESS_TEST

tests/run-make/raw-dylib-inline-cross-dylib/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ else
2626
$(CC) "$(TMPDIR)"/extern_1.obj -shared -o "$(TMPDIR)"/extern_1.dll
2727
$(CC) "$(TMPDIR)"/extern_2.obj -shared -o "$(TMPDIR)"/extern_2.dll
2828
endif
29-
$(call RUN,driver) > "$(TMPDIR)"/output.txt
29+
$(call RUN,driver) | tr -d '\r' > "$(TMPDIR)"/output.txt
3030
$(RUSTC_TEST_OP) "$(TMPDIR)"/output.txt output.txt

tests/run-make/raw-dylib-link-ordinal/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ ifdef IS_MSVC
1313
else
1414
$(CC) "$(TMPDIR)"/exporter.obj exporter.def -shared -o "$(TMPDIR)"/exporter.dll
1515
endif
16-
"$(TMPDIR)"/driver > "$(TMPDIR)"/output.txt
16+
"$(TMPDIR)"/driver | tr -d '\r' > "$(TMPDIR)"/output.txt
1717
$(RUSTC_TEST_OP) "$(TMPDIR)"/output.txt output.txt

0 commit comments

Comments
 (0)