[banshee/gtk3] build: add an array test for GConfSchemaExtractor



commit f1bfdeb753b6aed17d569a90d0af7cfdf616541e
Author: Andres G. Aragoneses <knocte gmail com>
Date:   Tue Dec 18 18:57:40 2012 +0000

    build: add an array test for GConfSchemaExtractor

 build/GConfSchemaExtractorTests.cs |   36 ++++++++++++++++++++++++++++++++++++
 1 files changed, 36 insertions(+), 0 deletions(-)
---
diff --git a/build/GConfSchemaExtractorTests.cs b/build/GConfSchemaExtractorTests.cs
index 697db9f..a47ba44 100644
--- a/build/GConfSchemaExtractorTests.cs
+++ b/build/GConfSchemaExtractorTests.cs
@@ -177,6 +177,42 @@ namespace GConfSchemaExtractor
 </gconfschemafile>"
             .Trim ()));
         }
+
+        internal class ArrayType {
+            public static readonly SchemaEntry<string[]> CurrentFiltersSchema = new SchemaEntry<string[]> (
+                "sources.fsq", "current_filters",
+                new string[] { "album", "artist" },
+                null,
+                null
+            );
+        }
+
+        [Test]
+        public void SchemaWithArray ()
+        {
+            StringBuilder result = GConfSchemaExtractorProgram.Extract (new Type [] { typeof (ArrayType) });
+
+            Assert.That (result, Is.Not.Null);
+            Assert.That (result.ToString ().Trim (), Is.EqualTo (@"
+<?xml version=""1.0""?>
+<gconfschemafile>
+  <schemalist>
+    <schema>
+      <key>/schemas/apps/banshee/sources/fsq/current_filters</key>
+      <applyto>/apps/banshee/sources/fsq/current_filters</applyto>
+      <owner>banshee</owner>
+      <type>list</type>
+      <list_type>string</list_type>
+      <default>[album,artist]</default>
+      <locale name=""C"">
+        <short></short>
+        <long></long>
+      </locale>
+    </schema>
+  </schemalist>
+</gconfschemafile>"
+                .Trim ()));
+        }
     }
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]