Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
TestURL.cpp File Reference
#include "URL.h"
#include <gtest/gtest.h>

Classes

class  TestCURL
 
struct  TestURLGetWithoutUserDetailsData
 
class  TestURLGetWithoutUserDetails
 
struct  TestNFSURLParsingData
 
class  TestNFSURLParsing
 

Functions

 TEST_F (TestCURL, TestComparison)
 
std::ostream & operator<< (std::ostream &os, const TestURLGetWithoutUserDetailsData &rhs)
 
 TEST_P (TestURLGetWithoutUserDetails, GetWithoutUserDetails)
 
 INSTANTIATE_TEST_SUITE_P (URL, TestURLGetWithoutUserDetails, ValuesIn(values))
 
 TEST (TestURLGetWithoutOptions, PreserveSlashesBetweenProtocolAndPath)
 
 TEST (TestURL, TestWithoutFilenameEncodingDecoding)
 
 TEST_F (TestCURL, TestPaths)
 
 TEST_F (TestCURL, TestExtensions)
 
 TEST_F (TestCURL, TestNFSURLWithOptions)
 
 TEST_F (TestCURL, TestNFSURLWithoutOptions)
 
 TEST_F (TestCURL, TestNFSURLWithPort)
 
 TEST_F (TestCURL, TestNFSURLWithPortAndOptions)
 
 TEST_F (TestCURL, TestNFSURLMultipleOptions)
 
 TEST_F (TestCURL, TestNFSURLWithSpecialCharacters)
 
 TEST_F (TestCURL, TestNFSURLReconstructed)
 
 TEST_F (TestCURL, TestNFSURLWithIPv6)
 
 TEST_F (TestCURL, TestNFSURLGetWithoutUserDetails)
 
 TEST_F (TestCURL, TestNFSURLGetWithoutOptions)
 
std::ostream & operator<< (std::ostream &os, const TestNFSURLParsingData &rhs)
 
 TEST_P (TestNFSURLParsing, ParseNFSURL)
 
 INSTANTIATE_TEST_SUITE_P (NFSParsing, TestNFSURLParsing, ValuesIn(nfsParsingData))
 

Variables

const TestURLGetWithoutUserDetailsData values []
 
const TestNFSURLParsingData nfsParsingData []
 

Function Documentation

◆ INSTANTIATE_TEST_SUITE_P() [1/2]

INSTANTIATE_TEST_SUITE_P ( NFSParsing ,
TestNFSURLParsing ,
ValuesIn(nfsParsingData)  )

◆ INSTANTIATE_TEST_SUITE_P() [2/2]

INSTANTIATE_TEST_SUITE_P ( URL ,
TestURLGetWithoutUserDetails ,
ValuesIn(values)  )

◆ operator<<() [1/2]

std::ostream & operator<< ( std::ostream & os,
const TestNFSURLParsingData & rhs )

◆ operator<<() [2/2]

std::ostream & operator<< ( std::ostream & os,
const TestURLGetWithoutUserDetailsData & rhs )

◆ TEST() [1/2]

TEST ( TestURL ,
TestWithoutFilenameEncodingDecoding  )

◆ TEST() [2/2]

TEST ( TestURLGetWithoutOptions ,
PreserveSlashesBetweenProtocolAndPath  )

◆ TEST_F() [1/13]

TEST_F ( TestCURL ,
TestComparison  )

◆ TEST_F() [2/13]

TEST_F ( TestCURL ,
TestExtensions  )

◆ TEST_F() [3/13]

TEST_F ( TestCURL ,
TestNFSURLGetWithoutOptions  )

◆ TEST_F() [4/13]

TEST_F ( TestCURL ,
TestNFSURLGetWithoutUserDetails  )

◆ TEST_F() [5/13]

TEST_F ( TestCURL ,
TestNFSURLMultipleOptions  )

◆ TEST_F() [6/13]

TEST_F ( TestCURL ,
TestNFSURLReconstructed  )

◆ TEST_F() [7/13]

TEST_F ( TestCURL ,
TestNFSURLWithIPv6  )

◆ TEST_F() [8/13]

TEST_F ( TestCURL ,
TestNFSURLWithOptions  )

◆ TEST_F() [9/13]

TEST_F ( TestCURL ,
TestNFSURLWithoutOptions  )

◆ TEST_F() [10/13]

TEST_F ( TestCURL ,
TestNFSURLWithPort  )

◆ TEST_F() [11/13]

TEST_F ( TestCURL ,
TestNFSURLWithPortAndOptions  )

◆ TEST_F() [12/13]

TEST_F ( TestCURL ,
TestNFSURLWithSpecialCharacters  )

◆ TEST_F() [13/13]

TEST_F ( TestCURL ,
TestPaths  )

◆ TEST_P() [1/2]

TEST_P ( TestNFSURLParsing ,
ParseNFSURL  )

◆ TEST_P() [2/2]

TEST_P ( TestURLGetWithoutUserDetails ,
GetWithoutUserDetails  )

Variable Documentation

◆ nfsParsingData

const TestNFSURLParsingData nfsParsingData[]
Initial value:
= {
{"nfs://192.168.178.23/share/file.mkv?mimetype=video%2fx-matroska", "nfs", "192.168.178.23",
"share/file.mkv", "?mimetype=video%2fx-matroska", "mkv"},
{"nfs://192.168.1.1/export/path/video.mp4", "nfs", "192.168.1.1", "export/path/video.mp4", "",
"mp4"},
{"nfs://10.0.0.5:2049/data/movie.avi?timeout=30", "nfs", "10.0.0.5", "data/movie.avi",
"?timeout=30", "avi"},
{"nfs://server.local/nfs/files.iso?mimetype=application%2fx-iso9660-image&version=1", "nfs",
"server.local", "nfs/files.iso", "?mimetype=application%2fx-iso9660-image&version=1", "iso"},
{"nfs://192.168.1.100/Public/My%20Videos/Movie%202020.mkv?type=video", "nfs", "192.168.1.100",
"Public/My%20Videos/Movie%202020.mkv", "?type=video", "mkv"},
}

◆ values

Initial value:
= {
{ std::string("smb://example.com/example"), std::string("smb://example.com/example"), false },
{ std::string("smb://example.com/example"), std::string("smb://example.com/example"), true },
{ std::string("smb://god:universe@example.com/example"), std::string("smb://example.com/example"), false },
{ std::string("smb://god@example.com/example"), std::string("smb://USERNAME@example.com/example"), true },
{ std::string("smb://god:universe@example.com/example"), std::string("smb://USERNAME:PASSWORD@example.com/example"), true },
{ std::string("http://god:universe@example.com:8448/example|auth=digest"), std::string("http://USERNAME:PASSWORD@example.com:8448/example|auth=digest"), true },
{ std::string("smb://fd00::1/example"), std::string("smb://fd00::1/example"), false },
{ std::string("smb://fd00::1/example"), std::string("smb://fd00::1/example"), true },
{ std::string("smb://[fd00::1]:8080/example"), std::string("smb://[fd00::1]:8080/example"), false },
{ std::string("smb://[fd00::1]:8080/example"), std::string("smb://[fd00::1]:8080/example"), true },
{ std::string("smb://god:universe@[fd00::1]:8080/example"), std::string("smb://[fd00::1]:8080/example"), false },
{ std::string("smb://god@[fd00::1]:8080/example"), std::string("smb://USERNAME@[fd00::1]:8080/example"), true },
{ std::string("smb://god:universe@fd00::1/example"), std::string("smb://USERNAME:PASSWORD@fd00::1/example"), true },
{ std::string("http://god:universe@[fd00::1]:8448/example|auth=digest"), std::string("http://USERNAME:PASSWORD@[fd00::1]:8448/example|auth=digest"), true },
{ std::string("smb://00ff:1:0000:abde::/example"), std::string("smb://00ff:1:0000:abde::/example"), true },
{ std::string("smb://god:universe@[00ff:1:0000:abde::]:8080/example"), std::string("smb://[00ff:1:0000:abde::]:8080/example"), false },
{ std::string("smb://god@[00ff:1:0000:abde::]:8080/example"), std::string("smb://USERNAME@[00ff:1:0000:abde::]:8080/example"), true },
{ std::string("smb://god:universe@00ff:1:0000:abde::/example"), std::string("smb://USERNAME:PASSWORD@00ff:1:0000:abde::/example"), true },
{ std::string("http://god:universe@[00ff:1:0000:abde::]:8448/example|auth=digest"), std::string("http://USERNAME:PASSWORD@[00ff:1:0000:abde::]:8448/example|auth=digest"), true },
{ std::string("smb://milkyway;god:universe@example.com/example"), std::string("smb://DOMAIN;USERNAME:PASSWORD@example.com/example"), true },
{ std::string("smb://milkyway;god@example.com/example"), std::string("smb://DOMAIN;USERNAME@example.com/example"), true },
{ std::string("smb://milkyway;@example.com/example"), std::string("smb://example.com/example"), true },
{ std::string("smb://milkyway;god:universe@example.com/example"), std::string("smb://example.com/example"), false },
{ std::string("smb://milkyway;god@example.com/example"), std::string("smb://example.com/example"), false },
{ std::string("smb://milkyway;@example.com/example"), std::string("smb://example.com/example"), false },
}