Skip to content

Commit

Permalink
Add test for 1MB file
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinbreiz committed Sep 9, 2023
1 parent b6a9197 commit be10177
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Tests/Kernels/Cosmos.Kernel.Tests.Fat/System.IO/FileTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,12 @@ public static void Execute(Debugger mDebugger)
string read = File.ReadAllText("0:\\long.txt");
Assert.AreEqual(text, read, "Reading files larger than one cluster works using read all text");

text = new string('l', 1000000);
File.WriteAllText("0:\\long.txt", text);

string read2 = File.ReadAllText("0:\\long.txt");
Assert.AreEqual(text, read2, "Reading files larger than 1MB works using read all text");

using (StreamReader streamReader = new StreamReader("0:\\long.txt"))
{
Assert.AreEqual(0, streamReader.BaseStream.Position, "Position of StreamReader is correct");
Expand Down

0 comments on commit be10177

Please sign in to comment.