mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-16 10:22:15 -05:00
#6411 Import Ensemble : Windows-style network path not working as effective filter
This commit is contained in:
1 parent
27ee22f420
commit
3518a63347
2 files changed
+48
-6
No files matched your search
@@ -81,4 +81,34 @@ TEST( RiaFilePathTools, rootSearchPathFromSearchFilter )
|
||||
QString resultRootPath = RiaFilePathTools::rootSearchPathFromSearchFilter( testPath );
|
||||
EXPECT_EQ( QString( "//A/B[?]/E/" ), resultRootPath );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
TEST( RiaFilePathTools, removeDuplicatePathSeparators )
|
||||
{
|
||||
{
|
||||
QString testPath( "//myshare/folder-a/folder-b/" );
|
||||
QString resultRootPath = RiaFilePathTools::removeDuplicatePathSeparators( testPath );
|
||||
EXPECT_STRCASEEQ( testPath.toLatin1(), resultRootPath.toLatin1() );
|
||||
}
|
||||
|
||||
{
|
||||
QString testPath( "//myshare/folder-a//folder-b/" );
|
||||
QString expectedPath( "//myshare/folder-a/folder-b/" );
|
||||
QString resultRootPath = RiaFilePathTools::removeDuplicatePathSeparators( testPath );
|
||||
EXPECT_STRCASEEQ( expectedPath.toLatin1(), resultRootPath.toLatin1() );
|
||||
}
|
||||
|
||||
{
|
||||
QString testPath( R"(\\myshare\folder-a\folder-b\)" );
|
||||
QString resultRootPath = RiaFilePathTools::removeDuplicatePathSeparators( testPath );
|
||||
EXPECT_STRCASEEQ( testPath.toLatin1(), resultRootPath.toLatin1() );
|
||||
}
|
||||
|
||||
{
|
||||
QString testPath( R"(\\myshare\folder-a\\folder-b\\)" );
|
||||
QString expectedPath( R"(\\myshare\folder-a\folder-b\)" );
|
||||
QString resultRootPath = RiaFilePathTools::removeDuplicatePathSeparators( testPath );
|
||||
EXPECT_STRCASEEQ( expectedPath.toLatin1(), resultRootPath.toLatin1() );
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user