Merge pull request #3563 from lewurm/interpreter
[mono.git] / mcs / tests / test-74.cs
1
2 //
3 // This test excercises #pre-processor directives in non-1 column
4 // as well as the literal strings
5 // Warning: The first empty line is important
6
7 using System.IO;
8
9 class X {
10         #if Blah
11         #else
12         public static int Main ()
13         {
14         #endif
15                 string s = @"Hola\";
16                 string d = "Hola\\";
17                 string e = @"Co""a";
18                 string f = "Co\"a";
19
20                 if (s != d)
21                         return 1;
22                 if (e != f)
23                         return 2;
24
25                 string g = "Hello\nworld";
26
27                 using (StreamReader sr = new StreamReader("test-74.cs")) {
28                         int i = sr.Read ();
29                         if (sr.Read () <= 13)
30                                 g = g.Replace ("\n", "\r\n");
31                 }
32
33                 string h = @"Hello
34 world";
35                 if (g != h) 
36                         return 3;
37
38                 System.Console.WriteLine ("OK");
39                 return 0;
40         }
41 }