tests: update replaces file with directory
This commit is contained in:
		
				
					committed by
					
						
						Duncan Overbruck
					
				
			
			
				
	
			
			
			
						parent
						
							8a81f6ce86
						
					
				
				
					commit
					514dca27ef
				
			@@ -92,8 +92,37 @@ directory_to_symlink_body() {
 | 
			
		||||
	atf_check_equal $? 0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
update_extract_dir_head() {
 | 
			
		||||
	atf_set "descr" "xbps-install(8): update replaces file with directory"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
update_extract_dir_body() {
 | 
			
		||||
	mkdir -p some_repo pkg_A
 | 
			
		||||
	touch pkg_A/file00
 | 
			
		||||
	cd some_repo
 | 
			
		||||
	xbps-create -A noarch -n A-1.0_1 -s "A pkg" ../pkg_A
 | 
			
		||||
	atf_check_equal $? 0
 | 
			
		||||
	xbps-rindex -d -a $PWD/*.xbps
 | 
			
		||||
	atf_check_equal $? 0
 | 
			
		||||
	cd ..
 | 
			
		||||
	xbps-install -r root -C empty.conf --repository=$PWD/some_repo -y A
 | 
			
		||||
	atf_check_equal $? 0
 | 
			
		||||
	rm pkg_A/file00
 | 
			
		||||
	mkdir -p pkg_A/file00
 | 
			
		||||
	touch pkg_A/file00/file01
 | 
			
		||||
	cd some_repo
 | 
			
		||||
	xbps-create -A noarch -n A-1.1_1 -s "A pkg" ../pkg_A
 | 
			
		||||
	atf_check_equal $? 0
 | 
			
		||||
	xbps-rindex -d -a $PWD/*.xbps
 | 
			
		||||
	atf_check_equal $? 0
 | 
			
		||||
	cd ..
 | 
			
		||||
	xbps-install -r root -C empty.conf --repository=$PWD/some_repo -d -Suy A
 | 
			
		||||
	atf_check_equal $? 0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
atf_init_test_cases() {
 | 
			
		||||
	atf_add_test_case install_existent
 | 
			
		||||
	atf_add_test_case update_existent
 | 
			
		||||
	# atf_add_test_case directory_to_symlink
 | 
			
		||||
	atf_add_test_case update_extract_dir
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user