This commit is contained in:
Thomas Levine 2012-10-10 20:23:57 -04:00
parent c6bad42e83
commit 2b4d4ff6e7
6 changed files with 37 additions and 12 deletions

3
.gitignore vendored
View File

@ -2,3 +2,6 @@ HEAD
src src
v* v*
alias alias
# For testing
bak

View File

@ -4,7 +4,6 @@
cd ../.. cd ../..
# Back up # Back up
mkdir -p bak rm -Rf v* src alias
mv v* src alias bak || sleep 0s
mkdir src alias mkdir src alias
) )

9
test/fast/setup_dir Executable file
View File

@ -0,0 +1,9 @@
#!/bin/sh
(
cd ../..
# Back up
mkdir -p bak
mv v* src alias bak || sleep 0s
)

View File

@ -1,16 +1,7 @@
#!/bin/sh #!/bin/sh
set -e
# Remove temporary files
( (
cd ../.. cd ../..
# Remove temporary files
rm -fR v* src alias rm -fR v* src alias
# Restore
if [ -d bak ]
then
mv bak/* . || sleep 0s
rmdir bak
fi
) )

13
test/fast/teardown_dir Executable file
View File

@ -0,0 +1,13 @@
#!/bin/sh
(
cd ../..
# Restore
if [ -d bak ]
then
mv bak/* . || sleep 0s
rmdir bak
fi
mkdir -p src alias
)

10
test/fast/uninstall Executable file
View File

@ -0,0 +1,10 @@
#!/bin/sh
cd ../..
mkdir v0.0.1
mkdir src/node-v0.0.1
. ./nvm.sh
nvm uninstall v0.0.1
[ ! -d 'v0.0.1' ] && [ ! -d 'src/node-v0.0.1' ]