Skip to content

Commit

Permalink
Add nvm_ensure_version_prefix unit tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Jan 14, 2015
1 parent 797c5ab commit d5e21be
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/fast/Unit tests/nvm_ensure_version_prefix
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh

die () { echo $@ ; exit 1; }

. ../../../nvm.sh

[ "_$(nvm_ensure_version_prefix 1)" = "_v1" ] || die '"nvm_ensure_version_prefix 1" did not return "v1"'
[ "_$(nvm_ensure_version_prefix v1)" = "_v1" ] || die '"nvm_ensure_version_prefix v1" did not return "v1"'
[ "_$(nvm_ensure_version_prefix foo)" = "_foo" ] || die '"nvm_ensure_version_prefix foo" did not return "foo"'

0 comments on commit d5e21be

Please sign in to comment.