mirror of
				https://github.com/nvm-sh/nvm.git
				synced 2025-10-31 10:15:53 +08:00 
			
		
		
		
	[Tests] add nvm run --lts tests.
				
					
				
			This commit is contained in:
		
							
								
								
									
										15
									
								
								test/slow/nvm run/Running "nvm run --lts" should work
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										15
									
								
								test/slow/nvm run/Running "nvm run --lts" should work
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,15 @@ | ||||
| #!/bin/sh | ||||
|  | ||||
| set -ex | ||||
|  | ||||
| die () { echo $@ ; exit 1; } | ||||
|  | ||||
| . ../../../nvm.sh | ||||
|  | ||||
| OUTPUT="$(nvm run --silent --lts --version)" | ||||
| EXPECTED_OUTPUT="$(nvm_match_version 'lts/*')" | ||||
| [ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die "\`nvm run --lts\` failed to run with the correct version; expected >${EXPECTED_OUTPUT}<, got >${OUTPUT}<" | ||||
|  | ||||
| OUTPUT="$(nvm run --silent --lts=argon --version)" | ||||
| EXPECTED_OUTPUT="$(nvm_match_version 'lts/argon')" | ||||
| [ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die "\`nvm run --lts=argon\` failed to run with the correct version; expected >${EXPECTED_OUTPUT}<, got >${OUTPUT}<" | ||||
		Reference in New Issue
	
	Block a user