[runtime] Remove all NACL support. It was unmaintained for a long time. (#4955)
[mono.git] / mono / tests / stream.cs
old mode 100755 (executable)
new mode 100644 (file)
index 0636c8d..d331438
@@ -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;
        }