nvm/test/fast/Unit tests/nvm_version_greater

11 lines
361 B
Bash
Executable File

#!/bin/sh
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
nvm_version_greater 0.10.0 0.2.12 || die '"nvm_version_greater 0.10.0 0.2.12" did not return true'
nvm_version_greater 0.10.0 0.20.12 && die '"nvm_version_greater 0.10.0 0.20.12" returned true'
nvm_version_greater 0.10.0 0.10.0 && die '"nvm_version_greater" returned false for the same two versions'