Morgan Smith <[email protected]> writes:

> Subject: [PATCH 03/13] Testing: Use advice to override time functions
>
> When including files that have been compiled that run this macro one
> would sometimes get the error "Invalid read syntax #<".
>
> By using advice things seem to work without error now.
>
> * testing/org-test.el (org-test-at-time): Advise time functions with
> `add-function' instead of directly setting the functions with
> `cl-letf'.

This looks clunky. I suspect that invalid read syntax errors might be
originating from ,at instances when AT is a string with properties that
contain some metadata that includes unreadable objects like buffers.
If my suspicion is correct, as simpler way to avoid runtime errors is
simply stripping AT from text properties. They are not needed anyway.


> Subject: [PATCH 11/13] Testing: Suppress suspicious eq warning
>
> * testing/lisp/test-org-element.el (test-org-element/copy): Suppress
> suspicious eq warning
> ---
>  testing/lisp/test-org-element.el | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/testing/lisp/test-org-element.el 
> b/testing/lisp/test-org-element.el
> index c082339c7..ecfa63a91 100644
> --- a/testing/lisp/test-org-element.el
> +++ b/testing/lisp/test-org-element.el
> @@ -811,7 +811,9 @@ test-org-element/copy
>    (should-not (org-element-copy nil))
>    ;; Return a copy secondary strings.
>    (should (equal '("text") (org-element-copy '("text"))))
> -  (should-not (eq '("text") (org-element-copy '("text"))))
> +  (with-suppressed-warnings ((suspicious eq))
> +    (should-not
> +     (eq '("text") (org-element-copy '("text")))))
>    ;; Do not alter the source.
>    (org-test-with-temp-text "*bold*"
>      (let* ((source (org-element-context))

This looks like a valid warning. Can change to equal I think.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

Reply via email to