mirror of
https://github.com/sshnet/SSH.NET.git
synced 2026-09-10 09:15:47 +00:00
Added more remote path transformation tests.
This commit is contained in:
@@ -446,7 +446,7 @@ namespace Renci.SshNet.Tests.Classes
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void ExclamationMark_Embedded()
|
||||
public void ExclamationMark_Embedded_Single()
|
||||
{
|
||||
const string path = "/var/garbage!/temp";
|
||||
|
||||
@@ -455,6 +455,16 @@ namespace Renci.SshNet.Tests.Classes
|
||||
Assert.AreEqual("\"/var/garbage!/temp\"", actual);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void ExclamationMark_Embedded_Sequence()
|
||||
{
|
||||
const string path = "/var/garbage!!/temp";
|
||||
|
||||
var actual = _transformation.Transform(path);
|
||||
|
||||
Assert.AreEqual("\"/var/garbage!!/temp\"", actual);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void ExclamationMark_Leading()
|
||||
{
|
||||
@@ -886,7 +896,7 @@ namespace Renci.SshNet.Tests.Classes
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void SingleQuote_Embedded()
|
||||
public void SingleQuote_Embedded_Single()
|
||||
{
|
||||
const string path = "Rain'Storm";
|
||||
|
||||
@@ -895,6 +905,16 @@ namespace Renci.SshNet.Tests.Classes
|
||||
Assert.AreEqual("\"Rain'Storm\"", actual);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void SingleQuote_Embedded_Sequence()
|
||||
{
|
||||
const string path = "Rain''Storm";
|
||||
|
||||
var actual = _transformation.Transform(path);
|
||||
|
||||
Assert.AreEqual("\"Rain''Storm\"", actual);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void SingleQuote_Leading()
|
||||
{
|
||||
@@ -925,6 +945,46 @@ namespace Renci.SshNet.Tests.Classes
|
||||
Assert.AreEqual("\"Time'\"", actual);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void SingleQuoteAndExclamationMark_Embedded()
|
||||
{
|
||||
const string path = "Rain'!Storm";
|
||||
|
||||
var actual = _transformation.Transform(path);
|
||||
|
||||
Assert.AreEqual("\"Rain'!Storm\"", actual);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void SingleQuoteAndExclamationMark_Leading()
|
||||
{
|
||||
const string path = "'!Rain";
|
||||
|
||||
var actual = _transformation.Transform(path);
|
||||
|
||||
Assert.AreEqual("\"'!Rain\"", actual);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void SingleQuoteAndExclamationMark_LeadingAndTrailing()
|
||||
{
|
||||
const string path = "'!Rain'!";
|
||||
|
||||
var actual = _transformation.Transform(path);
|
||||
|
||||
Assert.AreEqual("\"'!Rain'!\"", actual);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void SingleQuoteAndExclamationMark_Trailing()
|
||||
{
|
||||
const string path = "Rain'!";
|
||||
|
||||
var actual = _transformation.Transform(path);
|
||||
|
||||
Assert.AreEqual("\"Rain'!\"", actual);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void Space_Embedded()
|
||||
{
|
||||
|
||||
@@ -446,7 +446,7 @@ namespace Renci.SshNet.Tests.Classes
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void ExclamationMark_Embedded()
|
||||
public void ExclamationMark_Embedded_Single()
|
||||
{
|
||||
const string path = "/var/garbage!/temp";
|
||||
|
||||
@@ -455,6 +455,16 @@ namespace Renci.SshNet.Tests.Classes
|
||||
Assert.AreEqual("'/var/garbage'\\!'/temp'", actual);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void ExclamationMark_Embedded_Sequence()
|
||||
{
|
||||
const string path = "/var/garbage!!/temp";
|
||||
|
||||
var actual = _transformation.Transform(path);
|
||||
|
||||
Assert.AreEqual("'/var/garbage'\\!\\!'/temp'", actual);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void ExclamationMark_Leading()
|
||||
{
|
||||
@@ -886,7 +896,7 @@ namespace Renci.SshNet.Tests.Classes
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void SingleQuote_Embedded()
|
||||
public void SingleQuote_Embedded_Single()
|
||||
{
|
||||
const string path = "Rain'Storm";
|
||||
|
||||
@@ -895,6 +905,16 @@ namespace Renci.SshNet.Tests.Classes
|
||||
Assert.AreEqual("'Rain'\"'\"'Storm'", actual);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void SingleQuote_Embedded_Sequence()
|
||||
{
|
||||
const string path = "Rain''Storm";
|
||||
|
||||
var actual = _transformation.Transform(path);
|
||||
|
||||
Assert.AreEqual("'Rain'\"''\"'Storm'", actual);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void SingleQuote_Leading()
|
||||
{
|
||||
@@ -925,6 +945,46 @@ namespace Renci.SshNet.Tests.Classes
|
||||
Assert.AreEqual("'Time'\"'\"", actual);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void SingleQuoteAndExclamationMark_Embedded()
|
||||
{
|
||||
const string path = "Rain'!Storm";
|
||||
|
||||
var actual = _transformation.Transform(path);
|
||||
|
||||
Assert.AreEqual("'Rain'\"'\"\\!'Storm'", actual);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void SingleQuoteAndExclamationMark_Leading()
|
||||
{
|
||||
const string path = "'!Rain";
|
||||
|
||||
var actual = _transformation.Transform(path);
|
||||
|
||||
Assert.AreEqual("\"'\"\\!'Rain'", actual);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void SingleQuoteAndExclamationMark_LeadingAndTrailing()
|
||||
{
|
||||
const string path = "'!Rain'!";
|
||||
|
||||
var actual = _transformation.Transform(path);
|
||||
|
||||
Assert.AreEqual("\"'\"\\!'Rain'\"'\"\\!", actual);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void SingleQuoteAndExclamationMark_Trailing()
|
||||
{
|
||||
const string path = "Rain'!";
|
||||
|
||||
var actual = _transformation.Transform(path);
|
||||
|
||||
Assert.AreEqual("'Rain'\"'\"\\!", actual);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void Space_Embedded()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user