summaryrefslogtreecommitdiffstats
path: root/test cases/csharp/3 resource
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-29 04:41:38 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-29 04:41:38 +0000
commit7b6e527f440cd7e6f8be2b07cee320ee6ca18786 (patch)
tree4a2738d69fa2814659fdadddf5826282e73d81f4 /test cases/csharp/3 resource
parentInitial commit. (diff)
downloadmeson-7b6e527f440cd7e6f8be2b07cee320ee6ca18786.tar.xz
meson-7b6e527f440cd7e6f8be2b07cee320ee6ca18786.zip
Adding upstream version 1.0.1.upstream/1.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test cases/csharp/3 resource')
-rw-r--r--test cases/csharp/3 resource/TestRes.resx31
-rw-r--r--test cases/csharp/3 resource/meson.build6
-rw-r--r--test cases/csharp/3 resource/resprog.cs13
3 files changed, 50 insertions, 0 deletions
diff --git a/test cases/csharp/3 resource/TestRes.resx b/test cases/csharp/3 resource/TestRes.resx
new file mode 100644
index 0000000..c85f85c
--- /dev/null
+++ b/test cases/csharp/3 resource/TestRes.resx
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+<resheader name="resmimetype"><value>text/microsoft-resx</value></resheader><resheader name="version"><value>1.3</value></resheader><resheader name="reader"><value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value></resheader><resheader name="writer"><value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value></resheader><data name="message"><value>Hello from resources!</value></data>
+ </root> \ No newline at end of file
diff --git a/test cases/csharp/3 resource/meson.build b/test cases/csharp/3 resource/meson.build
new file mode 100644
index 0000000..25b273d
--- /dev/null
+++ b/test cases/csharp/3 resource/meson.build
@@ -0,0 +1,6 @@
+project('C# resource', 'cs')
+
+e = executable('resprog', 'resprog.cs',
+resources : 'TestRes.resx')
+
+test('restest', e)
diff --git a/test cases/csharp/3 resource/resprog.cs b/test cases/csharp/3 resource/resprog.cs
new file mode 100644
index 0000000..177201c
--- /dev/null
+++ b/test cases/csharp/3 resource/resprog.cs
@@ -0,0 +1,13 @@
+using System;
+using System.Resources;
+
+public class Prog {
+
+ static public void Main () {
+ ResourceManager res = new ResourceManager(typeof(TestRes));
+ Console.WriteLine(res.GetString("message"));
+ }
+
+ internal class TestRes {
+ }
+}