From e434f97be5717bf705ced58b1dfd83e7e04d80a2 Mon Sep 17 00:00:00 2001 From: Gert Driesen Date: Mon, 4 Sep 2017 18:45:23 +0200 Subject: [PATCH] Renamed Quote transformation and corresponding class to ShellQuote. Added DoubleQuote transformation. Modified default remote path transformation for ScpClient to DoubleQuote. --- .../Renci.SshNet.NET35.csproj | 8 +- .../Renci.SshNet.Tests.NET35.csproj | 5 +- .../Classes/ScpClientTest.cs | 306 +++++++++++++----- .../Classes/ScpClientTestBase.cs | 45 +++ ...rectoryInfo_SendExecRequestReturnsFalse.cs | 52 +-- ...AndFileInfo_SendExecRequestReturnsFalse.cs | 51 ++- ...thAndStream_SendExecRequestReturnsFalse.cs | 52 +-- ...InfoAndPath_SendExecRequestReturnsFalse.cs | 52 +-- ...InfoAndPath_SendExecRequestReturnsFalse.cs | 54 ++-- ...ientTest_Upload_FileInfoAndPath_Success.cs | 54 ++-- ...reamAndPath_SendExecRequestReturnsFalse.cs | 52 +-- .../Renci.SshNet.Tests.csproj | 1 + src/Renci.SshNet/IServiceFactory.cs | 9 +- .../PasswordAuthenticationMethod.cs | 11 + .../RemotePathDoubleQuoteTransformation.cs | 76 +++++ .../RemotePathNoneTransformation.cs | 4 + ... => RemotePathShellQuoteTransformation.cs} | 56 +++- src/Renci.SshNet/RemotePathTransformation.cs | 92 ++++-- src/Renci.SshNet/Renci.SshNet.csproj | 3 +- src/Renci.SshNet/ScpClient.cs | 12 +- src/Renci.SshNet/ServiceFactory.cs | 11 +- 21 files changed, 689 insertions(+), 317 deletions(-) create mode 100644 src/Renci.SshNet.Tests/Classes/ScpClientTestBase.cs create mode 100644 src/Renci.SshNet/RemotePathDoubleQuoteTransformation.cs rename src/Renci.SshNet/{RemotePathQuoteTransformation.cs => RemotePathShellQuoteTransformation.cs} (76%) diff --git a/src/Renci.SshNet.NET35/Renci.SshNet.NET35.csproj b/src/Renci.SshNet.NET35/Renci.SshNet.NET35.csproj index cd6a472c..c48e019a 100644 --- a/src/Renci.SshNet.NET35/Renci.SshNet.NET35.csproj +++ b/src/Renci.SshNet.NET35/Renci.SshNet.NET35.csproj @@ -581,14 +581,14 @@ ProxyTypes.cs - - RemotePathEscapeTransformation.cs + + RemotePathDoubleQuoteTransformation.cs RemotePathNoneTransformation.cs - - RemotePathQuoteTransformation.cs + + RemotePathShellQuoteTransformation.cs RemotePathTransformation.cs diff --git a/src/Renci.SshNet.Tests.NET35/Renci.SshNet.Tests.NET35.csproj b/src/Renci.SshNet.Tests.NET35/Renci.SshNet.Tests.NET35.csproj index 2f1f8809..7d3001d1 100644 --- a/src/Renci.SshNet.Tests.NET35/Renci.SshNet.Tests.NET35.csproj +++ b/src/Renci.SshNet.Tests.NET35/Renci.SshNet.Tests.NET35.csproj @@ -768,6 +768,9 @@ Classes\ScpClientTest.cs + + Classes\ScpClientTestBase.cs + Classes\ScpClientTest_Download_PathAndDirectoryInfo_SendExecRequestReturnsFalse.cs @@ -1584,7 +1587,7 @@ - +