test(scp): Add unit tests for getting remote files#1244
Conversation
5322a52 to
1302eb3
Compare
|
I think this should be tested within |
1302eb3 to
ccae0ad
Compare
Moved to |
You can call |
This doesn't seem to work, the diff doesn't look at the saved variables, it just uses |
How have you checked that it doesn't seem to work? I now tried that, but it works.
The saved variables are restored by |
Ah I managed it, I was trying to save the variable after it was changed, which in hindsight obviously doesn't make sense :) |
ccae0ad to
4485de6
Compare
1b29aa5 to
3f355a4
Compare
akinomyoga
left a comment
There was a problem hiding this comment.
The rest seems good. The mock ssh is of course not a complete implementation of the ssh argument parsing, but we can at least explain its limited behavior.
This tests the current behaviour of the xfunc_scp_compgen_remote_files function, including escaping, by introducing a fixture to mock ssh invocation on the local host.
3f355a4 to
b6e9900
Compare
This removes the script emulating ssh introduced in scop#1244
This removes the script emulating ssh introduced in scop#1244 Also Modify tests that assume there is a dir named bin/ in the scp fixture dir.
Since there doesn't seem to be any unit tests for xfuncs, I'm not sure if the naming here makes sense, or if I should make some more directories, for example a
unit/xfuncorfixtures/xfunc?I did this since there seems to be a lot of issues with this function, as seen in #910 and #765 (comment)
This should be a first good step to make fixing the issues easier IMO.