Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork940
Commit0f19fb0
committed
Fix tests so they don't try to run "g"
Both new shell-related tests were causing the code under test tosplit "git" into ["g", "i", "t"] and thus causing the code undertest to attempt to execute a "g" command. This passes the commandas a one-element list of strings rather than as a string, whichavoids this on all operating systems regardless of whether the codeunder test has a bug being tested for.This would not occur on Windows, which does not iterate commands oftype str character-by-character even when the command is runwithout a shell. But it did happen on other systems.Most of the time, the benefit of using a command that actually runs"git" rather than "g" is the avoidance of confusion in the errormessage. But this is also important because it is possible for theuser who runs the tests to have a "g" command, in which case itcould be very inconvenient, or even unsafe, to run "g". This shouldbe avoided even when the code under test has a bug that causes ashell to be used when it shouldn't or not used when it should, sohaving separate commands (list and str) per test case parameterswould not be a sufficient solution: it would only guard againstrunning "g" when a bug in the code under test were absent.1 parentaa5e2f6 commit0f19fb0
1 file changed
+2
-2
lines changedLines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
95 | 95 |
| |
96 | 96 |
| |
97 | 97 |
| |
98 |
| - | |
| 98 | + | |
99 | 99 |
| |
100 | 100 |
| |
101 | 101 |
| |
| |||
112 | 112 |
| |
113 | 113 |
| |
114 | 114 |
| |
115 |
| - | |
| 115 | + | |
116 | 116 |
| |
117 | 117 |
| |
118 | 118 |
| |
|
0 commit comments
Comments
(0)