mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-05-10 14:21:50 +00:00
nvm_format_version: add unit tests.
This commit is contained in:
parent
cd4fc8fb2c
commit
5706aef3d0
14
test/fast/Unit tests/nvm_format_version
Executable file
14
test/fast/Unit tests/nvm_format_version
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
die () { echo $@ ; exit 1; }
|
||||
|
||||
. ../../../nvm.sh
|
||||
|
||||
OUTPUT="$(nvm_format_version 0.1.2)"
|
||||
EXPECTED_OUTPUT="v0.1.2"
|
||||
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm_format_version 0.1.2 did not return $EXPECTED_OUTPUT; got $OUTPUT"
|
||||
|
||||
OUTPUT="$(nvm_format_version 0.1)"
|
||||
EXPECTED_OUTPUT="v0.1.0"
|
||||
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm_format_version 0.1.0 did not return $EXPECTED_OUTPUT; got $OUTPUT"
|
||||
|
Loading…
Reference in New Issue
Block a user