mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-19 20:39:01 +00:00
- Make DirectoryInfo work - Refactored FAT TestRunner in a similar way to the BCL one - Bugfix: Path.GetTempPath() did not returned a complete path - Added to VFS "naive" support to Get / Set file attributes (for now only Get is supported) - Added more debug logs
35 lines
1,009 B
C#
35 lines
1,009 B
C#
using System.IO;
|
|
using Cosmos.TestRunner;
|
|
using Cosmos.Debug.Kernel;
|
|
|
|
namespace Cosmos.Kernel.Tests.Fat.System.IO
|
|
{
|
|
class StreamReaderTest
|
|
{
|
|
/// <summary>
|
|
/// Tests System.IO.StreamReader plugs.
|
|
/// </summary>
|
|
public static void Execute(Debugger mDebugger)
|
|
{
|
|
mDebugger.Send("START TEST: StreamReader:");
|
|
mDebugger.Send("Create StreamReader");
|
|
|
|
using (var xSR = new StreamReader(@"0:\test.txt"))
|
|
{
|
|
if (xSR != null)
|
|
{
|
|
mDebugger.Send("Start reading");
|
|
|
|
var content = xSR.ReadToEnd();
|
|
Assert.IsTrue(content == "A line of text for testing\nSecond line", "Content: " + content);
|
|
}
|
|
else
|
|
{
|
|
Assert.IsTrue(false, @"Failed to create StreamReader for file 0:\test.txt");
|
|
}
|
|
}
|
|
|
|
mDebugger.Send("END TEST");
|
|
}
|
|
}
|
|
}
|