diff options
author | Abseil Team <absl-team@google.com> | 2023-01-17 07:12:03 -0800 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-01-17 07:12:50 -0800 |
commit | ac7a126f39d5bcd909b78c9e69900c76659b1bbb (patch) | |
tree | 27ab203a03da682c00184f393fe06c1bada64446 /googlemock | |
parent | 356fc301251378e0f6fa6aa794d73714202887ac (diff) | |
download | googletest-git-ac7a126f39d5bcd909b78c9e69900c76659b1bbb.tar.gz |
gmock_output_test: normalize golden file output to unix line endings
When checked out on Windows, the repo might use \r\n line endings,
and so the golden output has them. Adjust for that.
PiperOrigin-RevId: 502577222
Change-Id: Iabfe537f6d95a49bf6bdcb934e855d28c65f6f89
Diffstat (limited to 'googlemock')
-rwxr-xr-x | googlemock/test/gmock_output_test.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/googlemock/test/gmock_output_test.py b/googlemock/test/gmock_output_test.py index 6b4ab901..d7c3f27e 100755 --- a/googlemock/test/gmock_output_test.py +++ b/googlemock/test/gmock_output_test.py @@ -159,6 +159,9 @@ class GMockOutputTest(gmock_test_utils.TestCase): golden_file = open(GOLDEN_PATH, 'rb') golden = golden_file.read().decode('utf-8') golden_file.close() + # On Windows the repository might have been checked out with \r\n line + # endings, so normalize it here. + golden = ToUnixLineEnding(golden) # The normalized output should match the golden file. self.assertEqual(golden, output) |