diff options
author | Andi McClure <andi.mcclure@xamarin.com> | 2016-04-20 00:13:31 +0300 |
---|---|---|
committer | Andi McClure <andi.mcclure@xamarin.com> | 2016-04-20 00:13:31 +0300 |
commit | fee605ccc5d330dc01bc2570b994af3a612382d5 (patch) | |
tree | ad9127967a4d10db8d765d5d4ea9f25796750bae /mcs/class/System.Configuration | |
parent | a2e91efda821cbd0c993fb71517b542cd856de3b (diff) |
Add xml configuration section test (bug#39669)
Diffstat (limited to 'mcs/class/System.Configuration')
4 files changed, 35 insertions, 1 deletions
diff --git a/mcs/class/System.Configuration/Test/standalone/Makefile b/mcs/class/System.Configuration/Test/standalone/Makefile index a5e28c61bc5..1d4994c36f0 100644 --- a/mcs/class/System.Configuration/Test/standalone/Makefile +++ b/mcs/class/System.Configuration/Test/standalone/Makefile @@ -2,7 +2,7 @@ thisdir = class/System.Configuration/Test/standalone SUBDIRS = include ../../../../build/rules.make -TESTS = t1.exe t2.exe t3.exe t4.exe t5.exe t6.exe t7.exe t8.exe t9.exe t10.exe t11.exe t12.exe t15.exe t16.exe t17.exe t18.exe t19.exe t20.exe t21.exe t22.exe t23.exe t24.exe t25.exe t28.exe t29.exe t30.exe t31.exe t32.exe t33.exe t34.exe t35.exe t36.exe t37.exe t38.exe t39.exe t40.exe t41.exe t42.exe t43.exe t44.exe t45.exe t46.exe t47.exe +TESTS = t1.exe t2.exe t3.exe t4.exe t5.exe t6.exe t7.exe t8.exe t9.exe t10.exe t11.exe t12.exe t15.exe t16.exe t17.exe t18.exe t19.exe t20.exe t21.exe t22.exe t23.exe t24.exe t25.exe t28.exe t29.exe t30.exe t31.exe t32.exe t33.exe t34.exe t35.exe t36.exe t37.exe t38.exe t39.exe t40.exe t41.exe t42.exe t43.exe t44.exe t45.exe t46.exe t47.exe t48.exe # t13.exe t14.exe t26.exe t27.exe check: local compare diff --git a/mcs/class/System.Configuration/Test/standalone/t48.cs b/mcs/class/System.Configuration/Test/standalone/t48.cs new file mode 100644 index 00000000000..6d7bc05f3b3 --- /dev/null +++ b/mcs/class/System.Configuration/Test/standalone/t48.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections; + +// Bugzilla #39669 + +namespace TestConfigSection +{ + class Test + { + public static int Main (string[] args) + { + Hashtable testCustomSection = (Hashtable)System.Configuration.ConfigurationManager.GetSection ("TestCustomSection"); + string proxyServer = (string)testCustomSection["ProxyServer"]; + + if (proxyServer == null) + throw new Exception("Custom section value is null"); + + if (proxyServer != "server.example.com") + throw new Exception("Custom section value is incorrect"); + + return 0; + } + } +} diff --git a/mcs/class/System.Configuration/Test/standalone/t48.exe.config b/mcs/class/System.Configuration/Test/standalone/t48.exe.config new file mode 100644 index 00000000000..ebdf8a8e610 --- /dev/null +++ b/mcs/class/System.Configuration/Test/standalone/t48.exe.config @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8"?> +<configuration> + <configSections> + <section name="TestCustomSection" type="System.Configuration.DictionarySectionHandler" /> + </configSections> + <TestCustomSection> + <add key="ProxyServer" value="server.example.com" /> + <add key="ConnectOnStart" value="false" /> + </TestCustomSection> +</configuration>
\ No newline at end of file diff --git a/mcs/class/System.Configuration/Test/standalone/t48.exe.expected b/mcs/class/System.Configuration/Test/standalone/t48.exe.expected new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/mcs/class/System.Configuration/Test/standalone/t48.exe.expected |