aboutsummaryrefslogtreecommitdiffstats
path: root/meson/test cases/csharp/3 resource
diff options
context:
space:
mode:
authorAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-10 14:33:42 +0000
committerAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-10 14:33:42 +0000
commitaf1a266670d040d2f4083ff309d732d648afba2a (patch)
tree2fc46203448ddcc6f81546d379abfaeb323575e9 /meson/test cases/csharp/3 resource
parente02cda008591317b1625707ff8e115a4841aa889 (diff)
Add submodule dependency filesHEADmaster
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'meson/test cases/csharp/3 resource')
-rw-r--r--meson/test cases/csharp/3 resource/TestRes.resx31
-rw-r--r--meson/test cases/csharp/3 resource/meson.build6
-rw-r--r--meson/test cases/csharp/3 resource/resprog.cs13
3 files changed, 50 insertions, 0 deletions
diff --git a/meson/test cases/csharp/3 resource/TestRes.resx b/meson/test cases/csharp/3 resource/TestRes.resx
new file mode 100644
index 000000000..c85f85c36
--- /dev/null
+++ b/meson/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/meson/test cases/csharp/3 resource/meson.build b/meson/test cases/csharp/3 resource/meson.build
new file mode 100644
index 000000000..25b273d83
--- /dev/null
+++ b/meson/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/meson/test cases/csharp/3 resource/resprog.cs b/meson/test cases/csharp/3 resource/resprog.cs
new file mode 100644
index 000000000..177201c08
--- /dev/null
+++ b/meson/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 {
+ }
+}