You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			22 lines
		
	
	
		
			597 B
		
	
	
	
		
			C++
		
	
			
		
		
	
	
			22 lines
		
	
	
		
			597 B
		
	
	
	
		
			C++
		
	
/*
 | 
						|
 * Unit tests for src/util/
 | 
						|
 */
 | 
						|
 | 
						|
#include "util/UriUtil.hxx"
 | 
						|
 | 
						|
#include <gtest/gtest.h>
 | 
						|
 | 
						|
TEST(UriUtil, RemoveAuth)
 | 
						|
{
 | 
						|
	EXPECT_EQ(std::string(),
 | 
						|
		  uri_remove_auth("http://www.example.com/"));
 | 
						|
	EXPECT_EQ(std::string("http://www.example.com/"),
 | 
						|
		  uri_remove_auth("http://foo:bar@www.example.com/"));
 | 
						|
	EXPECT_EQ(std::string("http://www.example.com/"),
 | 
						|
		  uri_remove_auth("http://foo@www.example.com/"));
 | 
						|
	EXPECT_EQ(std::string(),
 | 
						|
		  uri_remove_auth("http://www.example.com/f:oo@bar"));
 | 
						|
	EXPECT_EQ(std::string("ftp://ftp.example.com/"),
 | 
						|
		  uri_remove_auth("ftp://foo:bar@ftp.example.com/"));
 | 
						|
}
 |