emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/assess 63e934c6f2 76/95: State that text properties are


From: ELPA Syncer
Subject: [elpa] externals/assess 63e934c6f2 76/95: State that text properties are ignored
Date: Tue, 19 Jul 2022 15:57:35 -0400 (EDT)

branch: externals/assess
commit 63e934c6f2e502642dc1c915ec7576b92cebfde1
Author: Phillip Lord <phillip.lord@russet.org.uk>
Commit: Phillip Lord <phillip.lord@russet.org.uk>

    State that text properties are ignored
    
    Add an explicit statement that assess= ignores text properties, by
    virtue of using string=. Add a test to support this.
    
    Closes #11
---
 assess.el           |  4 +++-
 test/assess-test.el | 15 +++++++++++++++
 2 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/assess.el b/assess.el
index fdde8174de..7cadab2c46 100644
--- a/assess.el
+++ b/assess.el
@@ -470,7 +470,9 @@ afterwards for cleanup by the operating system."
 Equality in this sense means compare the contents in a way which
 is appropriate for the type of the two arguments. So, if they are
 strings, the compare strings, if buffers, then compare the buffer
-contents and so on."
+contents and so on.
+
+Text properties in strings or buffers are ignored."
   (string=
    (assess-to-string a)
    (assess-to-string b)))
diff --git a/test/assess-test.el b/test/assess-test.el
index 4fa902daf2..8158010752 100644
--- a/test/assess-test.el
+++ b/test/assess-test.el
@@ -526,4 +526,19 @@ This also tests the advice on string=."
 ;; https://github.com/phillord/assess/issues/5
 (ert-deftest issue-5-test-example ()
   (should-not (assess-indentation= 'fundamental-mode "foo" "bar")))
+
+
+(ert-deftest strings-with-unequal-properties ()
+  (should
+   (assess=
+    (propertize "hello" 'property 1)
+    "hello"))
+  (should
+   (assess-with-temp-buffers
+       ((a (insert ";; Commented")
+           (emacs-lisp-mode)
+           (font-lock-ensure))
+        (b (insert ";; Commented")
+           (font-lock-ensure)))
+     (assess= a b))))
 ;; #+end_src



reply via email to

[Prev in Thread] Current Thread [Next in Thread]