Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/Newtonsoft.Json.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Src/Newtonsoft.Json.Tests/JsonTextReaderTest.cs')
-rw-r--r--Src/Newtonsoft.Json.Tests/JsonTextReaderTest.cs10
1 files changed, 10 insertions, 0 deletions
diff --git a/Src/Newtonsoft.Json.Tests/JsonTextReaderTest.cs b/Src/Newtonsoft.Json.Tests/JsonTextReaderTest.cs
index 446512c..a1cb857 100644
--- a/Src/Newtonsoft.Json.Tests/JsonTextReaderTest.cs
+++ b/Src/Newtonsoft.Json.Tests/JsonTextReaderTest.cs
@@ -1923,5 +1923,15 @@ bye", reader.Value);
reader.Read();
Assert.AreEqual(JsonToken.EndArray, reader.TokenType);
}
+
+ [Test]
+ [ExpectedException(typeof(JsonReaderException), ExpectedMessage = "Additional text encountered after finished reading JSON content: }. Line 1, position 2.")]
+ public void UnexpectedEndTokenWhenParsingOddEndToken()
+ {
+ JsonReader reader = new JsonTextReader(new StringReader(@"{}}"));
+ Assert.IsTrue(reader.Read());
+ Assert.IsTrue(reader.Read());
+ reader.Read();
+ }
}
} \ No newline at end of file