String .BeEquivalentTo() is case-sensitive on linux
See original GitHub issueIt seems that BeEquivalentTo()
doesn’t ignore case when comparing strings on Linux environment.
"SomeString".Should().BeEquivalentTo("somestring");
Expected: verification passes.
It works as expected on Windows, but throws but "SomeString" differs near "Som" (index 0)
exception on Linux.
On the same environment string assertion from NUnit framework works as expected.
StringAssert.AreEqualIgnoringCase("SomeString", "somestring");
Info:
- FluentAssertions v5.7.0
- .netcoreapp 2.1
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (10 by maintainers)
Top Results From Across the Web
fluent assertions - How to compare case insensitive string ...
How can I easy compare string case insensitive using FluentAssertions? Something like: symbol.Should().Be(expectedSymbol, StringComparison.
Read more >getdate(3p) - Linux manual page - Michael Kerrisk
The getdate() function shall convert a string representation of a date or time ... and input specification performed by getdate() shall be case-insensitive....
Read more >5 Linguistic Sorting and Matching
The ordering of strings in a set is called sorting. For example, the ORDER BY clause uses ... Case-Insensitive and Accent-Insensitive Linguistic Collation....
Read more >Documentation: 15: 4.1. Lexical Structure
Key words and unquoted identifiers are case insensitive. ... A string constant in SQL is an arbitrary sequence of characters bounded by single...
Read more >Device Tree Linux
Node names are supposed to be case sensitive. The function that checks whether a node name matches a string may be defined by...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I wouldn’t mind including the extra xunit code. It could maybe combine it with
[CollectionDefinition]
to disable parallelization for those tests mingling with theCurrentCulture
, see an example inAssertionOptionSpecs.cs
Yeah, I find it strange that about half of the StringAssertions use Ordinal, and half use CurrentCulture. It is probably a breaking change. But having code be asserted differently depending on your machine is also not expected I guess.