Tests containing escaped new lines (\n) fail on Windows
CronKz opened this issue · 0 comments
CronKz commented
Product
Hot Chocolate
Version
14.0.0
Link to minimal reproduction
See below
Steps to reproduce
- Use a Windows machine
- Run any Integration Test containing escaped new lines
\n
- Example:
HotChocolate.Data.EntitiyFramework.Pagination.Tests
Paging_With_PagingFlags_Override
What is expected?
The tests should succeed
What is actually happening?
The tests fail when comparing the diff. Windows uses \r\n
instead of \n
.
Xunit.Sdk.XunitException
The snapshot does not match:
Paging_With_PagingFlags_Override
{
"data": {
"products": {
"pageCount": 10
}
},
"extensions": {
- "sql": "-- @__p_0='11'\nSELECT p.\"Id\", p.\"AvailableStock\", p.\"BrandId\", p.\"Description\", p.\"ImageFileName\", p.\"MaxStockThreshold\", p.\"Name\", p.\"OnReorder\", p.\"Price\", p.\"RestockThreshold\", p.\"TypeId\"\nFROM \"Products\" AS p\nORDER BY p.\"Id\"\nLIMIT @__p_0"
+ "sql": "-- @__p_0='11'\r\nSELECT p.\"Id\", p.\"AvailableStock\", p.\"BrandId\", p.\"Description\", p.\"ImageFileName\", p.\"MaxStockThreshold\", p.\"Name\", p.\"OnReorder\", p.\"Price\", p.\"RestockThreshold\", p.\"TypeId\"\r\nFROM \"Products\" AS p\r\nORDER BY p.\"Id\"\r\nLIMIT @__p_0"
}
}
Relevant log output
No response
Additional context
I'll submit a possible fix