mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-24 22:27:55 -05:00
21 lines
778 B
C++
21 lines
778 B
C++
#include "gtest/gtest.h"
|
|
|
|
#include "RimTools.h"
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
///
|
|
//--------------------------------------------------------------------------------------------------
|
|
TEST( RimToolsTest, ReplacePathPattern )
|
|
{
|
|
QString previousProjectPath = "C:/path/to/projectFileFolder";
|
|
|
|
QString realization = "realization-*/MY_CASE-*";
|
|
|
|
QString originalPattern = "C:/path/to/" + realization;
|
|
QString newProjectPath = "/mnt/new/path/to/projectFileFolder";
|
|
QString expectedPattern = "/mnt/new/path/to/" + realization;
|
|
|
|
QString resultPattern = RimTools::relocatePathPattern( originalPattern, newProjectPath, previousProjectPath );
|
|
EXPECT_EQ( resultPattern, expectedPattern );
|
|
}
|