File tree Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ Release History
5
5
Dev
6
6
7
7
- Escape ``which `` calls to avoid aliases. Resolves :bbissue: `46 `.
8
+ - Integrate Manuel Kaufmann's patch to unset GREP_OPTIONS before
9
+ calling grep. Resolves :bbissue: `51 `.
8
10
9
11
2.2
10
12
Original file line number Diff line number Diff line change @@ -49,6 +49,17 @@ test_virtualenvwrapper_verify_workon_home_missing_dir() {
49
49
WORKON_HOME=" $old_home "
50
50
}
51
51
52
+ test_virtualenvwrapper_verify_workon_home_missing_dir_grep_options () {
53
+ old_home=" $WORKON_HOME "
54
+ WORKON_HOME=" $WORKON_HOME /not_there"
55
+ # This should prevent the message from being found if it isn't
56
+ # unset correctly.
57
+ export GREP_OPTIONS=" --count"
58
+ assertFalse " WORKON_HOME verified unexpectedly" virtualenvwrapper_verify_workon_home
59
+ WORKON_HOME=" $old_home "
60
+ unset GREP_OPTIONS
61
+ }
62
+
52
63
test_virtualenvwrapper_verify_workon_home_missing_dir_quiet_init () {
53
64
old_home=" $WORKON_HOME "
54
65
export WORKON_HOME=" $WORKON_HOME /not_there"
Original file line number Diff line number Diff line change @@ -74,6 +74,17 @@ test_virtualenvwrapper_show_workon_options () {
74
74
rm -f " $WORKON_HOME /link_env"
75
75
}
76
76
77
+ test_virtualenvwrapper_show_workon_options_grep_options () {
78
+ mkdir " $WORKON_HOME /not_env"
79
+ (cd " $WORKON_HOME " ; ln -s env1 link_env)
80
+ export GREP_OPTIONS=" --count"
81
+ envs=$( virtualenvwrapper_show_workon_options | tr ' \n' ' ' )
82
+ unset GREP_OPTIONS
83
+ assertSame " env1 env2 link_env " " $envs "
84
+ rmdir " $WORKON_HOME /not_env"
85
+ rm -f " $WORKON_HOME /link_env"
86
+ }
87
+
77
88
test_virtualenvwrapper_show_workon_options_no_envs () {
78
89
old_home=" $WORKON_HOME "
79
90
export WORKON_HOME=${TMPDIR:-/ tmp} /$$
You can’t perform that action at this time.
0 commit comments