File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ oneTimeSetUp() {
9
9
unset VIRTUAL_ENV
10
10
source " $test_dir /../virtualenvwrapper.sh"
11
11
mkvirtualenv cd-test > /dev/null 2>&1
12
+ mkvirtualenv " env with space" > /dev/null 2>&1
12
13
deactivate
13
14
}
14
15
@@ -38,6 +39,16 @@ test_cdvirtual() {
38
39
virtualenvwrapper_cd " $start_dir "
39
40
}
40
41
42
+ test_cdvirtual_space_in_name () {
43
+ workon " env with space"
44
+ start_dir=" $( pwd) "
45
+ cdvirtualenv
46
+ assertSame " $VIRTUAL_ENV " " $( pwd) "
47
+ cdvirtualenv bin
48
+ assertSame " $VIRTUAL_ENV /bin" " $( pwd) "
49
+ virtualenvwrapper_cd " $start_dir "
50
+ }
51
+
41
52
test_cdsitepackages () {
42
53
start_dir=" $( pwd) "
43
54
cdsitepackages
@@ -47,6 +58,16 @@ test_cdsitepackages () {
47
58
virtualenvwrapper_cd " $start_dir "
48
59
}
49
60
61
+ test_cdsitepackages_space_in_name () {
62
+ workon " env with space"
63
+ start_dir=" $( pwd) "
64
+ cdsitepackages
65
+ pyvers=$( python -V 2>&1 | cut -f2 -d' ' | cut -f1-2 -d.)
66
+ sitepackages=" $VIRTUAL_ENV /lib/python${pyvers} /site-packages"
67
+ assertSame " $sitepackages " " $( pwd) "
68
+ virtualenvwrapper_cd " $start_dir "
69
+ }
70
+
50
71
test_cdsitepackages_with_arg () {
51
72
start_dir=" $( pwd) "
52
73
pyvers=$( python -V 2>&1 | cut -f2 -d' ' | cut -f1-2 -d.)
Original file line number Diff line number Diff line change @@ -892,7 +892,7 @@ function cdsitepackages {
892
892
function cdvirtualenv {
893
893
virtualenvwrapper_verify_workon_home || return 1
894
894
virtualenvwrapper_verify_active_environment || return 1
895
- virtualenvwrapper_cd $VIRTUAL_ENV /$1
895
+ virtualenvwrapper_cd " $VIRTUAL_ENV " /$1
896
896
}
897
897
898
898
# Shows the content of the site-packages directory of the currently-active
You can’t perform that action at this time.
0 commit comments