mirror of
				https://github.com/nvm-sh/nvm.git
				synced 2025-11-03 22:47:13 +00:00 
			
		
		
		
	fast tests
This commit is contained in:
		
							parent
							
								
									2eeea14805
								
							
						
					
					
						commit
						9454096bc6
					
				
							
								
								
									
										6
									
								
								test/fast/deactivate
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										6
									
								
								test/fast/deactivate
									
									
									
									
									
										Executable file
									
								
							@ -0,0 +1,6 @@
 | 
				
			|||||||
 | 
					#!/bin/sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					. ../../nvm.sh
 | 
				
			||||||
 | 
					nvm &&
 | 
				
			||||||
 | 
					nvm deactivate &&
 | 
				
			||||||
 | 
					! nvm
 | 
				
			||||||
							
								
								
									
										9
									
								
								test/fast/ls
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										9
									
								
								test/fast/ls
									
									
									
									
									
										Executable file
									
								
							@ -0,0 +1,9 @@
 | 
				
			|||||||
 | 
					#!/bin/sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					. ../../nvm.sh
 | 
				
			||||||
 | 
					mkdir -p ../../v0.0.{1,3,9}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# The result should contain the version numbers.
 | 
				
			||||||
 | 
					nvm ls | grep v0.0.1 &&
 | 
				
			||||||
 | 
					nvm ls | grep v0.0.3 &&
 | 
				
			||||||
 | 
					nvm ls | grep v0.0.9
 | 
				
			||||||
							
								
								
									
										10
									
								
								test/fast/setup
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										10
									
								
								test/fast/setup
									
									
									
									
									
										Executable file
									
								
							@ -0,0 +1,10 @@
 | 
				
			|||||||
 | 
					#!/bin/sh
 | 
				
			||||||
 | 
					set -e
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					(
 | 
				
			||||||
 | 
					  cd ../..
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  # Back up
 | 
				
			||||||
 | 
					  mkdir -p bak
 | 
				
			||||||
 | 
					  mv v* src alias bak || sleep 0s
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
@ -1,4 +1,4 @@
 | 
				
			|||||||
#!/bin/sh
 | 
					#!/bin/sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
. ../nvm.sh
 | 
					. ../../nvm.sh
 | 
				
			||||||
nvm
 | 
					nvm
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										16
									
								
								test/fast/teardown
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										16
									
								
								test/fast/teardown
									
									
									
									
									
										Executable file
									
								
							@ -0,0 +1,16 @@
 | 
				
			|||||||
 | 
					#!/bin/sh
 | 
				
			||||||
 | 
					set -e
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					(
 | 
				
			||||||
 | 
					  cd ../..
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  # Remove temporary files
 | 
				
			||||||
 | 
					  rm -fR v* src alias
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  # Restore
 | 
				
			||||||
 | 
					  if [ -d bak ]
 | 
				
			||||||
 | 
					    then
 | 
				
			||||||
 | 
					    mv bak/* . || sleep 0s
 | 
				
			||||||
 | 
					    rmdir bak
 | 
				
			||||||
 | 
					  fi
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user