mirror of
				https://github.com/lukechilds/zsh-nvm.git
				synced 2025-10-30 14:46:28 +08:00 
			
		
		
		
	Test zsh-nvm doesn't overwrite nvm installs
This commit is contained in:
		
							parent
							
								
									41f68d7f1e
								
							
						
					
					
						commit
						f8e0c4c5de
					
				
							
								
								
									
										16
									
								
								tests/loading/Check zsh-nvm doesn't install nvm if it's already installed
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										16
									
								
								tests/loading/Check zsh-nvm doesn't install nvm if it's already installed
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,16 @@ | ||||
| source ../common.sh | ||||
| 
 | ||||
| nvm_placeholder="nvm placeholder" | ||||
| 
 | ||||
| # Fake nvm installation | ||||
| mkdir "$NVM_DIR" | ||||
| echo "$nvm_placeholder" > "$NVM_DIR/nvm.sh" | ||||
| 
 | ||||
| # Check fake nvm file is there | ||||
| [[ -f "$NVM_DIR/nvm.sh" ]] || die "Fake nvm file wasn't created" | ||||
| 
 | ||||
| # Load zsh-nvm | ||||
| load_zsh_nvm | ||||
| 
 | ||||
| # Check fake nvm installation wasn't overwritten | ||||
| [[ $(cat "$NVM_DIR/nvm.sh") == "$nvm_placeholder" ]] || die "Existing nvm installation was overwritten" | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Luke Childs
						Luke Childs