Test for multiple marshalled strings.
[mono.git] / mono / tests / setenv.cs
1 using System;
2 using System.Runtime.InteropServices;
3
4 namespace Test {
5
6         public class Test {
7                 [DllImport("libc")]
8                 static extern int setenv(string name, string value, int overwrite);
9                 [DllImport("libc")]
10                 static extern string getenv(string name);
11
12                 static int Main() {
13                         string name = "mono_test";
14                         string value = "val";
15
16                         setenv (name, value, 1);
17                         string ret = getenv (name);
18
19                         if (ret != value)
20                                 return 1;
21                         return 0;
22                 }
23         }
24 }