We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9222739 commit cf9beb7Copy full SHA for cf9beb7
test/fast/Unit tests/nvm_tree_contains_path
@@ -1,6 +1,8 @@
1
#!/bin/sh
2
3
cleanup () {
4
+ rm tmp3/tmp2
5
+ rmdir tmp3
6
rm tmp/node
7
rmdir tmp
8
rm tmp2/node
@@ -14,6 +16,8 @@ mkdir -p tmp
14
16
touch tmp/node
15
17
mkdir -p tmp2
18
touch tmp2/node
19
+mkdir -p tmp3
20
+ln -s tmp2 tmp3/
21
22
[ "$(nvm_tree_contains_path 2>&1)" = "both the tree and the node path are required" ] || die 'incorrect error message with no args'
23
[ "$(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"'
28
32
29
33
nvm_tree_contains_path tmp2 tmp/node && die '"tmp2" should not contain "tmp/node"'
30
34
35
+nvm_tree_contains_path tmp2 tmp3 && die 'no idea'
36
+
31
37
cleanup
0 commit comments