mirror of
				https://github.com/nvm-sh/nvm.git
				synced 2025-10-31 10:15:53 +08:00 
			
		
		
		
	Provide test case for testing the noclobber option from zsh
				
					
				
			This tests the absence of the bug from #615
This commit is contained in:
		| @@ -0,0 +1,21 @@ | |||||||
|  | #!/bin/sh | ||||||
|  |  | ||||||
|  | . ../../../nvm.sh | ||||||
|  |  | ||||||
|  | die () { echo $@ ; exit 1; } | ||||||
|  |  | ||||||
|  | if [ -n "$ZSH_VERSION" ]; then | ||||||
|  |   # set clobber option in order to test that this does not produce any | ||||||
|  |   # incompatibilities | ||||||
|  |   setopt noclobber | ||||||
|  | fi | ||||||
|  |  | ||||||
|  | nvm alias test-stable-1 0.0.2 | ||||||
|  |  | ||||||
|  | nvm alias test-stable-1 | \grep -e "test-stable-1 -> 0.0.2 (-> v0.0.2)" \ | ||||||
|  |   || die "nvm alias test-stable-1 0.0.2 did not set test-stable-1 to 0.0.2" | ||||||
|  |  | ||||||
|  | nvm alias test-stable-1 0.0.1 | ||||||
|  |  | ||||||
|  | nvm alias test-stable-1 | \grep -e "test-stable-1 -> 0.0.1 (-> v0.0.1)" \ | ||||||
|  |   || die "nvm alias test-stable-1 0.0.1 did not set test-stable-1 to 0.0.1" | ||||||
		Reference in New Issue
	
	Block a user