Index: src/Libraries/Hyena/Hyena.Query/Tests/QueryTests.cs
===================================================================
--- src/Libraries/Hyena/Hyena.Query/Tests/QueryTests.cs	(revision 4340)
+++ src/Libraries/Hyena/Hyena.Query/Tests/QueryTests.cs	(working copy)
@@ -147,6 +147,20 @@
                 MimeTypeField.ToSql (StringQueryValue.Contains, val)
             );
         }
+		
+        [Test]
+        // Test behavior issues described in
+        // http://bugzilla.gnome.org/show_bug.cgi?id=547078
+        public void ParenthesesInQuotes ()
+        {
+            string query = "artist==\"foo (disc 2)\"";
+
+            QueryNode query_tree = UserQueryParser.Parse (query, FieldSet);
+            Assert.IsNotNull (query_tree, "Query should parse");
+            string query_fragment = query_tree.ToSql (FieldSet);
+            Assert.AreEqual ("(CoreArtists.NameLowered = 'foo (disc 2)' AND CoreArtists.NameLowered IS NOT NULL)",
+                query_fragment);
+        }
     
         private static void UserQueryParsesAndGenerates (string query)
         {
