mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-03 20:57:39 -06:00
#7494 Summary Plot: Lumped completions short names are wrong
Replace tabs in summary quantity name with space
This commit is contained in:
parent
f5547dd551
commit
4a61226926
@ -289,6 +289,8 @@ std::string stringFromPointer( const char* pointerToChar )
|
||||
if ( pointerToChar )
|
||||
{
|
||||
myString = pointerToChar;
|
||||
|
||||
replace( myString.begin(), myString.end(), '\t', ' ' );
|
||||
}
|
||||
|
||||
return myString;
|
||||
|
@ -41,3 +41,19 @@ TEST( RiaStdStringToolsTest, EditDistance )
|
||||
EXPECT_EQ( 3, RiaStdStringTools::computeEditDistance( "Saturday", "Sunday" ) );
|
||||
EXPECT_EQ( 3, RiaStdStringTools::computeEditDistance( "Sunday", "Saturday" ) );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
TEST( RiaStdStringToolsTest, TrimStrings )
|
||||
{
|
||||
// Test replace of tabs with space
|
||||
{
|
||||
std::string text = "test\t\tnext word";
|
||||
|
||||
replace( text.begin(), text.end(), '\t', ' ' );
|
||||
|
||||
std::string expectedText = "test next word";
|
||||
EXPECT_EQ( text, expectedText );
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user