mirror of
				https://github.com/tmux-plugins/tmux-resurrect.git
				synced 2025-11-04 00:46:04 +00:00 
			
		
		
		
	Resurrect restore test and updates
This commit is contained in:
		@@ -53,3 +53,13 @@ proc start_resurrect_save {} {
 | 
			
		||||
  send ""
 | 
			
		||||
  sleep 5
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
proc start_resurrect_restore {} {
 | 
			
		||||
  send ""
 | 
			
		||||
  sleep 10
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
proc clear_screen_for_window {target} {
 | 
			
		||||
  send "tmux send-keys -t $target C-l\r"
 | 
			
		||||
  sleep 0.2
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										18
									
								
								tests/helpers/restore_and_save_tmux_test_environment.exp
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										18
									
								
								tests/helpers/restore_and_save_tmux_test_environment.exp
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,18 @@
 | 
			
		||||
#!/usr/bin/env expect
 | 
			
		||||
 | 
			
		||||
source "./tests/helpers/expect_helpers.exp"
 | 
			
		||||
 | 
			
		||||
expect_setup
 | 
			
		||||
 | 
			
		||||
spawn tmux
 | 
			
		||||
# delay with sleep to compensate for tmux starting time
 | 
			
		||||
sleep 1
 | 
			
		||||
 | 
			
		||||
start_resurrect_restore
 | 
			
		||||
 | 
			
		||||
# delete all existing resurrect save files
 | 
			
		||||
run_shell_command "rm ~/.tmux/resurrect/*"
 | 
			
		||||
 | 
			
		||||
start_resurrect_save
 | 
			
		||||
 | 
			
		||||
run_shell_command "tmux kill-server"
 | 
			
		||||
@@ -6,7 +6,13 @@ install_tmux_resurrect_helper() {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# we want "fixed" dimensions no matter the size of real display
 | 
			
		||||
set_screen_dimensions() {
 | 
			
		||||
set_screen_dimensions_helper() {
 | 
			
		||||
	stty cols 200
 | 
			
		||||
	stty rows 50
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
last_save_file_differs_helper() {
 | 
			
		||||
	local original_file="$1"
 | 
			
		||||
	diff "$original_file" "${HOME}/.tmux/resurrect/last"
 | 
			
		||||
	[ $? -ne 0 ]
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user