mirror of
				https://github.com/tmux-plugins/tpm.git
				synced 2025-11-04 08:36:05 +00:00 
			
		
		
		
	Change testing directory structure
This commit is contained in:
		
							
								
								
									
										3
									
								
								test/Vagrantfile → Vagrantfile
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								test/Vagrantfile → Vagrantfile
									
									
									
									
										vendored
									
									
								
							@@ -4,8 +4,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
 | 
			
		||||
  config.vm.box = 'precise32'
 | 
			
		||||
  config.vm.box_url = 'http://files.vagrantup.com/precise32.box'
 | 
			
		||||
 | 
			
		||||
  # tpm is synced to `/root/tmux_plugin_manager` in vagrant
 | 
			
		||||
  config.vm.synced_folder '../', '/home/vagrant/tpm'
 | 
			
		||||
  config.vm.synced_folder './', '/home/vagrant/tpm'
 | 
			
		||||
 | 
			
		||||
  config.vm.provision 'shell', path: 'vagrant_provisioning.sh'
 | 
			
		||||
end
 | 
			
		||||
@@ -22,7 +22,7 @@ test_files() {
 | 
			
		||||
 | 
			
		||||
run_tests() {
 | 
			
		||||
	local test_file
 | 
			
		||||
	local test_dir_path="~/tpm/test/tests/"
 | 
			
		||||
	local test_dir_path="~/tpm/tests/"
 | 
			
		||||
	for test_file in $(test_files); do
 | 
			
		||||
		echo "Running test: $test_file"
 | 
			
		||||
		vagrant ssh -c "${test_dir_path}${test_file}"
 | 
			
		||||
@@ -1,16 +0,0 @@
 | 
			
		||||
# TPM tests
 | 
			
		||||
 | 
			
		||||
- all testing is done with vagrant for complete isolation from
 | 
			
		||||
  local development environment.
 | 
			
		||||
- `expect` program is used for testing tmux client (keybindings and some output)
 | 
			
		||||
 | 
			
		||||
#### Running tests
 | 
			
		||||
 | 
			
		||||
Requirements: [vagrant](https://www.vagrantup.com/)
 | 
			
		||||
 | 
			
		||||
Running test suite is easy:
 | 
			
		||||
 | 
			
		||||
    # within `tpm` project directory
 | 
			
		||||
 | 
			
		||||
    $ cd test           # enter test directory
 | 
			
		||||
    $ ./run             # runs all the tests
 | 
			
		||||
@@ -37,7 +37,7 @@ check_dir_exists_helper() {
 | 
			
		||||
 | 
			
		||||
fail_helper() {
 | 
			
		||||
	local message="$1"
 | 
			
		||||
	echo "Tmux plugin installation fails" >&2
 | 
			
		||||
	echo "$message" >&2
 | 
			
		||||
	FAIL="true"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user