You've already forked linux-packaging-mono
Imported Upstream version 4.6.0.125
Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
This commit is contained in:
parent
a569aebcfd
commit
e79aa3c0ed
@ -1728,5 +1728,30 @@ namespace MonoTests.System.IO
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
[Test] // Covers #11699
|
||||
public void ReadWriteFileLength ()
|
||||
{
|
||||
int bufferSize = 128;
|
||||
int readLength = 1;
|
||||
int writeLength = bufferSize + 1;
|
||||
|
||||
string path = TempFolder + DSC + "readwritefilelength.tmp";
|
||||
|
||||
try {
|
||||
File.WriteAllBytes (path, new byte [readLength + 1]);
|
||||
|
||||
using (var file = new FileStream (path, FileMode.Open, FileAccess.ReadWrite, FileShare.Read,
|
||||
bufferSize, FileOptions.SequentialScan))
|
||||
{
|
||||
file.Read (new byte [readLength], 0, readLength);
|
||||
file.Write (new byte [writeLength], 0, writeLength);
|
||||
|
||||
Assert.AreEqual (readLength + writeLength, file.Length);
|
||||
}
|
||||
} finally {
|
||||
DeleteFile (path);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user