From 9f597a4c5976f4e435f54eca988bf6bccd3e3213 Mon Sep 17 00:00:00 2001 From: Jon Skeet Date: Mon, 28 Mar 2022 11:38:50 +0100 Subject: [PATCH] Add regression test for https://github.com/protocolbuffers/protobuf/issues/9526 --- tests.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests.sh b/tests.sh index 73460fda3d..a41f69fc6c 100755 --- a/tests.sh +++ b/tests.sh @@ -165,6 +165,14 @@ build_csharp() { # Run csharp compatibility test between last released and the current version. csharp/compatibility_tests/v3.0.0/test.sh $LAST_RELEASED + + # Regression test for https://github.com/protocolbuffers/protobuf/issues/9526 + # - all line endings in .proto and .cs (and .csproj) files should be LF. + if git ls-files --eol csharp | grep -E '\.cs|\.proto' | grep -v w/lf + then + echo "The files listed above have mixed or CRLF line endings; please change to LF." + exit 1 + fi } build_golang() {