language-extensions/R/test/src/RExtensionLibraryApiTests.cpp
//----------------------------------------------------------------------------------------------
// Name: InstallMultipleTest
//
// Description:
//  Installs multiple packages in different paths without cleaning.
//
InstallMultipleTest
Description:
Installs multiple packages in different paths without cleaning.
InstallMultipleTest Description : Installs multiple packages in different paths without cleaning .
TEST_F(RExtensionLibraryApiTests, InstallMultipleTest)
	{
		vector<string> libNames{ "assertthat", "pkgconfig", "rlang" };
		vector<string> versions{ "0.2.1", "2.0.3", "0.4.7"};
		vector<string> zipFileNames{
			sm_PublicDbIdUserIdPrefix + libNames[0] + "_"
				+ versions[0] + x_FileExtension,
			sm_PublicDbIdUserIdPrefix + libNames[1] + "_"
				+ versions[1] + x_FileExtension,
			sm_PrivateDbIdUserIdPrefix + libNames[2] + "_"
				+ versions[2] + x_FileExtension };
		vector<fs::path> pkgPaths{
			sm_packagesSourcePath / x_OsName / zipFileNames[0],
			sm_packagesSourcePath / x_OsName / zipFileNames[1],
			sm_packagesSourcePath / x_OsName / zipFileNames[2] };
		EXPECT_TRUE(fs::exists(pkgPaths[0]));
		InstallAndTest(
			libNames[0],
			pkgPaths[0].string(),
			sm_publicLibraryPath,
			versions[0]);
		EXPECT_TRUE(fs::exists(pkgPaths[1]));
		InstallAndTest(
			libNames[1],
			pkgPaths[1].string(),
			sm_publicLibraryPath,
			versions[1]);
		EXPECT_TRUE(fs::exists(pkgPaths[2]));
		InstallAndTest(
			libNames[2],
			pkgPaths[2].string(),
			sm_privateLibraryPath,
			versions[2]);
		UninstallAndTest(
			libNames[0],
			sm_publicLibraryPath);
		UninstallAndTest(
			libNames[1],
			sm_publicLibraryPath);
		UninstallAndTest(
			libNames[2],
			sm_privateLibraryPath);
	}
TEST_F ( RExtensionLibraryApiTests , InstallMultipleTest ) { vector < string > libNames { " " , " " , " " } ; vector < string > versions { " " , " " , " " } ; vector < string > zipFileNames { sm_PublicDbIdUserIdPrefix + libNames [ 0 ] + " " + versions [ 0 ] + x_FileExtension , sm_PublicDbIdUserIdPrefix + libNames [ 1 ] + " " + versions [ 1 ] + x_FileExtension , sm_PrivateDbIdUserIdPrefix + libNames [ 2 ] + " " + versions [ 2 ] + x_FileExtension } ; vector < fs :: path > pkgPaths { sm_packagesSourcePath / x_OsName / zipFileNames [ 0 ] , sm_packagesSourcePath / x_OsName / zipFileNames [ 1 ] , sm_packagesSourcePath / x_OsName / zipFileNames [ 2 ] } ; EXPECT_TRUE ( fs :: exists ( pkgPaths [ 0 ] ) ) ; InstallAndTest ( libNames [ 0 ] , pkgPaths [ 0 ] . string ( ) , sm_publicLibraryPath , versions [ 0 ] ) ; EXPECT_TRUE ( fs :: exists ( pkgPaths [ 1 ] ) ) ; InstallAndTest ( libNames [ 1 ] , pkgPaths [ 1 ] . string ( ) , sm_publicLibraryPath , versions [ 1 ] ) ; EXPECT_TRUE ( fs :: exists ( pkgPaths [ 2 ] ) ) ; InstallAndTest ( libNames [ 2 ] , pkgPaths [ 2 ] . string ( ) , sm_privateLibraryPath , versions [ 2 ] ) ; UninstallAndTest ( libNames [ 0 ] , sm_publicLibraryPath ) ; UninstallAndTest ( libNames [ 1 ] , sm_publicLibraryPath ) ; UninstallAndTest ( libNames [ 2 ] , sm_privateLibraryPath ) ; }
Name: InstallMultipleTest
Description:
Installs multiple packages in different paths without cleaning.
Name : InstallMultipleTest Description : Installs multiple packages in different paths without cleaning .