Add test with escaped JSON Path (#2138)

This commit is contained in:
James Newton-King
2019-08-19 13:35:19 +12:00
committed by GitHub
parent 5eac02a797
commit e82421145b
@@ -1489,6 +1489,23 @@ namespace Newtonsoft.Json.Tests.Linq.JsonPath
Assert.AreEqual("String", mustBeString2.Single());
}
[Test]
public void QueryWithEscapedPath()
{
JToken t = JToken.Parse(@"{
""Property"": [
{
""@Name"": ""x"",
""@Value"": ""y"",
""@Type"": ""FindMe""
}
]
}");
var tokens = t.SelectTokens("$..[?(@.['@Type'] == 'FindMe')]").ToList();
Assert.AreEqual(1, tokens.Count);
}
[Test]
public void Equals_FloatWithInt()
{