Subject: bug#43252: Fwd: bug#43252: 27.1; DBus properties lack type hints or overrides

From: Michael Albinus <[email-masked]>
Date: Thu, 10 Sep 2020 10:00:00 +0200

Subject: Re: bug#43252: 27.1; DBus properties lack type hints or overrides
From: Hugh Daschbach <[email-masked]>
To: Michael Albinus <[email-masked]>
Date: Wed, 09 Sep 2020 19:32:57 -0700

Michael Albinus writes:

> Hugh Daschbach <[email-masked]> writes:
>
> Hi Hugh,
>
> Appended. And thanks for your offer!

Thanks, Michael.  I've sent the email requesting the paperwork.
Will
let you know when it's submitted.

In the meantime, just to check that I'm on the right track, I've
attached a failing test.  Sadly, it's more than 15 lines.  Feel
free to
test with it.

For the moment, I'll only forward failing tests.  Once the
paperwork is
finalized I'll send you whatever suite of tests I've managed to
come up
with by then.

Just for the record, I'm testing master currently at d08568e6e92.

Cheers,
Hugh

diff --git a/test/lisp/net/dbus-tests.el b/test/lisp/net/dbus-tests.el
index 8b456c3551f..8b79f5ac201 100644
--- a/test/lisp/net/dbus-tests.el
+++ b/test/lisp/net/dbus-tests.el
@@ -520,6 +520,31 @@ dbus-test05-register-property-several-paths
     ;; Cleanup.
     (dbus-unregister-service :session dbus--test-service)))

+(ert-deftest dbus-test06-register-property-types ()
+  "Check property type preservation for an own service."
+  (skip-unless dbus--test-enabled-session-bus)
+  (dbus-ignore-errors (dbus-unregister-service :session dbus--test-service))
+
+  (unwind-protect
+      (let ((byte-array "ByteArray"))
+        (should
+         (equal
+          (dbus-register-property
+           :session dbus--test-service dbus--test-path
+           dbus--test-interface byte-array :read byte-array '(:array :byte 1 :byte 2 : byte 3))
+          `((:property :session dbus--test-path ,byte-array)
+            (,dbus--test-service ,dbus--test-path))))
+        (should
+         (string-equal
+          (dbus-get-property
+           :session dbus--test-service dbus--test-path
+           dbus--test-interface byte-array)
+          '(1 2 3))))
+
+    ;; Cleanup.
+    (dbus-unregister-service :session dbus--test-service)))
+
+
 (defun dbus-test-all (&optional interactive)
   "Run all tests for \\[dbus]."
   (interactive "p")