File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,10 @@ test_associate_relative_path() {
41
41
ptrfile=" $WORKON_HOME /$env /.project"
42
42
mkvirtualenv -a " $project " " $env " > /dev/null 2>&1
43
43
assertTrue " .project not found" " [ -f $ptrfile ]"
44
- assertEquals " $ptrfile contains wrong content" " $WORKON_HOME /$project " " $( cat $ptrfile ) "
44
+ assertEquals \
45
+ " $ptrfile contains wrong content" \
46
+ " $WORKON_HOME /$project " \
47
+ " $( cat $ptrfile | sed ' s|^/private||' ) "
45
48
}
46
49
47
50
test_associate_not_a_directory () {
@@ -118,7 +121,13 @@ test_associate_relative_with_dots() {
118
121
ptrfile=" $WORKON_HOME /$env /.project"
119
122
mkvirtualenv -a " $project " " $env " > /dev/null 2>&1
120
123
assertTrue " .project not found" " [ -f $ptrfile ]"
121
- assertEquals " $ptrfile contains wrong content" " $WORKON_HOME /project$n " " $( cat $ptrfile ) "
124
+ # Sometimes OS X prepends /private on the front of the temporary
125
+ # directory, but the directory is the same as without it, so strip
126
+ # it if we see the value in the project file.
127
+ assertEquals \
128
+ " $ptrfile contains wrong content" \
129
+ " $WORKON_HOME /project$n " \
130
+ " $( cat $ptrfile | sed ' s|^/private||' ) "
122
131
}
123
132
124
133
. " $test_dir /shunit2"
You can’t perform that action at this time.
0 commit comments