Bump API snapshot submodule
[mono.git] / mcs / tests / test-74.cs
old mode 100755 (executable)
new mode 100644 (file)
index ede9e38..396a1c1
@@ -1,11 +1,15 @@
+
 //
 // This test excercises #pre-processor directives in non-1 column
 // as well as the literal strings
-//
+// Warning: The first empty line is important
+
+using System.IO;
+
 class X {
        #if Blah
        #else
-       static int Main ()
+       public static int Main ()
        {
        #endif
                string s = @"Hola\";
@@ -17,6 +21,21 @@ class X {
                        return 1;
                if (e != f)
                        return 2;
+
+               string g = "Hello\nworld";
+
+               using (StreamReader sr = new StreamReader("test-74.cs")) {
+                       int i = sr.Read ();
+                       if (sr.Read () <= 13)
+                               g = g.Replace ("\n", "\r\n");
+               }
+
+               string h = @"Hello
+world";
+               if (g != h) 
+                       return 3;
+
+               System.Console.WriteLine ("OK");
                return 0;
        }
 }