mirror of
				https://github.com/tmux-plugins/tpm.git
				synced 2025-11-04 08:36:05 +00:00 
			
		
		
		
	First version of tests
This commit is contained in:
		
							
								
								
									
										35
									
								
								test/tests/expect_successful_plugin_download
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										35
									
								
								test/tests/expect_successful_plugin_download
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,35 @@
 | 
			
		||||
#!/usr/bin/env expect
 | 
			
		||||
 | 
			
		||||
# disables script output
 | 
			
		||||
log_user 0
 | 
			
		||||
 | 
			
		||||
spawn tmux
 | 
			
		||||
 | 
			
		||||
# Waiting for tmux to attach. If this is not done, next command, `send` will
 | 
			
		||||
# not work properly.
 | 
			
		||||
sleep 1
 | 
			
		||||
 | 
			
		||||
# this is tmux prefix + I
 | 
			
		||||
send "I"
 | 
			
		||||
 | 
			
		||||
# cloning might take a while
 | 
			
		||||
set timeout 15
 | 
			
		||||
 | 
			
		||||
expect {
 | 
			
		||||
  "Downloading bruno-/tmux_example_plugin" {
 | 
			
		||||
 | 
			
		||||
    expect {
 | 
			
		||||
      "bruno-/tmux_example_plugin download success" {
 | 
			
		||||
 | 
			
		||||
        expect { "Done, press ENTER to continue" { exit } }
 | 
			
		||||
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  timeout {
 | 
			
		||||
    puts "Plugin update timeout";
 | 
			
		||||
    exit 1
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user