Skip to content

Commit cf9beb7

Browse files
committed
[Tests] add some WIP tests
1 parent 9222739 commit cf9beb7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/fast/Unit tests/nvm_tree_contains_path

+6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/bin/sh
22

33
cleanup () {
4+
rm tmp3/tmp2
5+
rmdir tmp3
46
rm tmp/node
57
rmdir tmp
68
rm tmp2/node
@@ -14,6 +16,8 @@ mkdir -p tmp
1416
touch tmp/node
1517
mkdir -p tmp2
1618
touch tmp2/node
19+
mkdir -p tmp3
20+
ln -s tmp2 tmp3/
1721

1822
[ "$(nvm_tree_contains_path 2>&1)" = "both the tree and the node path are required" ] || die 'incorrect error message with no args'
1923
[ "$(nvm_tree_contains_path > /dev/null 2>&1 ; echo $?)" = "2" ] || die 'incorrect error code with no args'
@@ -28,4 +32,6 @@ nvm_tree_contains_path tmp2 tmp2/node || die '"tmp2" should contain "tmp2/node"'
2832

2933
nvm_tree_contains_path tmp2 tmp/node && die '"tmp2" should not contain "tmp/node"'
3034

35+
nvm_tree_contains_path tmp2 tmp3 && die 'no idea'
36+
3137
cleanup

0 commit comments

Comments
 (0)