From 6af7f92ab3a4d3fd70efa93b377d88056b9cbf02 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Wed, 30 Jul 2014 15:49:01 +0300 Subject: Handle C# resource files. --- test cases/csharp/3 resource/TestRes.resx | 31 +++++++++++++++++++++++++++++++ test cases/csharp/3 resource/meson.build | 6 ++++++ test cases/csharp/3 resource/resprog.cs | 13 +++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 test cases/csharp/3 resource/TestRes.resx create mode 100644 test cases/csharp/3 resource/meson.build create mode 100644 test cases/csharp/3 resource/resprog.cs (limited to 'test cases/csharp') 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 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +text/microsoft-resx1.3System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089Hello from resources! + \ 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 { + } +} -- cgit v1.1