Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGert Driesen <drieseng@users.sourceforge.net>2006-05-17 22:33:43 +0400
committerGert Driesen <drieseng@users.sourceforge.net>2006-05-17 22:33:43 +0400
commit4cc1d915e14439d44e447fa615e9b975f0848289 (patch)
tree5843e1a63316a3417cf1cbcb68b47b396bc7290e /mcs/tests/test-513.cs
parent37b07fb137e64f7bdd3f54f6b9e36f361d87f407 (diff)
* driver.cs: Pass filename without path to AssemblyBuilder's
AddResourceFile. Fixes bug #78407. * test-513.cs: New test for bug #78407. svn path=/trunk/mcs/; revision=60797
Diffstat (limited to 'mcs/tests/test-513.cs')
-rw-r--r--mcs/tests/test-513.cs48
1 files changed, 48 insertions, 0 deletions
diff --git a/mcs/tests/test-513.cs b/mcs/tests/test-513.cs
new file mode 100644
index 00000000000..6ae3e9f366c
--- /dev/null
+++ b/mcs/tests/test-513.cs
@@ -0,0 +1,48 @@
+// Compiler options: -linkresource:test-513.cs -linkresource:test-512.cs -linkresource:./test-511.cs,test
+
+using System;
+using System.IO;
+using System.Reflection;
+
+public class Test
+{
+ static int Main ()
+ {
+ Assembly a = Assembly.GetExecutingAssembly ();
+ string[] resourceNames = a.GetManifestResourceNames ();
+ if (resourceNames.Length != 3)
+ return 1;
+ if (resourceNames[0] != "test-513.cs")
+ return 1;
+ if (resourceNames[1] != "test-512.cs")
+ return 1;
+ if (resourceNames[2] != "test")
+ return 1;
+ FileStream f = a.GetFile ("test-513.cs");
+ if (f == null)
+ return 1;
+ f = a.GetFile ("test-512.cs");
+ if (f == null)
+ return 1;
+ f = a.GetFile ("test-511.cs");
+ if (f == null)
+ return 1;
+ f = a.GetFile ("test");
+ if (f != null)
+ return 1;
+ Stream s = a.GetManifestResourceStream ("test-513.cs");
+ if (s == null)
+ return 1;
+ s = a.GetManifestResourceStream ("test-512.cs");
+ if (s == null)
+ return 1;
+ s = a.GetManifestResourceStream ("test");
+ if (s == null)
+ return 1;
+ s = a.GetManifestResourceStream ("test-511.cs");
+ if (s != null)
+ return 1;
+
+ return 0;
+ }
+}