X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Ftests%2Fstream.cs;h=d3314381c00091ae965642534e7a78f7228d0892;hb=7993c2e3d523bc943eaea77422e2f56f80fc9e94;hp=0636c8dc0d2a8440777de3defc110d815b785233;hpb=00938302f310437623a24e042a5b91ad08fe25fa;p=mono.git diff --git a/mono/tests/stream.cs b/mono/tests/stream.cs old mode 100755 new mode 100644 index 0636c8dc0d2..d3314381c00 --- a/mono/tests/stream.cs +++ b/mono/tests/stream.cs @@ -4,9 +4,19 @@ using System.IO; public class Test { public static int Main () { - FileStream s = new FileStream ("/tmp/stest.dat", FileMode.Create); - - + byte[] buf = new byte [20]; + int i; + FileStream s = new FileStream ("stest.dat", FileMode.OpenOrCreate, FileAccess.ReadWrite); + for (i=0; i < 20; ++i) + buf [i] = 65; + s.Write (buf, 0, 20); + s.Position = 0; + for (i=0; i < 20; ++i) + buf [i] = 66; + s.Read (buf, 0, 20); + for (i=0; i < 20; ++i) + if (buf [i] != 65) + return 1; return 0; }