aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-04-12 13:47:32 +0200
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-04-12 13:47:32 +0200
commit82d1189d7ea816c4419c28558ce5ce4a5c26b16e (patch)
tree7a77f39d643fff499c110dcde0915aaf783af9ca /test
parent8b65f27106f55b7f2868ee4c7e1a965eee24fd97 (diff)
parente54deed13f3ccf3dc14d9a77417ee0688dc30987 (diff)
Merge branch 'develop'
Diffstat (limited to 'test')
-rw-r--r--test/mastodon-tl-tests.el57
1 files changed, 31 insertions, 26 deletions
diff --git a/test/mastodon-tl-tests.el b/test/mastodon-tl-tests.el
index a284c25..a3ac330 100644
--- a/test/mastodon-tl-tests.el
+++ b/test/mastodon-tl-tests.el
@@ -316,9 +316,10 @@ Strict-Transport-Security: max-age=31536000
(handle-location 20))
(should (string= (substring-no-properties
byline)
- "Account 42 (@acct42@example.space) 2999-99-99 00:11:22
- ------------
-"))
+ (concat "Account 42 (@acct42@example.space) 2999-99-99 00:11:22
+ "
+ mastodon-tl--horiz-bar "
+")))
(should (eq (get-text-property handle-location 'mastodon-tab-stop byline)
'user-handle))
(should (string= (get-text-property handle-location 'mastodon-handle byline)
@@ -340,9 +341,10 @@ Strict-Transport-Security: max-age=31536000
(mastodon-tl--byline mastodon-tl-test-base-toot
'mastodon-tl--byline-author
'mastodon-tl--byline-boosted))
- "Account 42 (@acct42@example.space) 2999-99-99 00:11:22
- ------------
-")))))
+ (concat "Account 42 (@acct42@example.space) 2999-99-99 00:11:22
+ "
+ mastodon-tl--horiz-bar "
+"))))))
(ert-deftest mastodon-tl--byline-boosted ()
"Should format the boosted toot correctly."
@@ -359,9 +361,10 @@ Strict-Transport-Security: max-age=31536000
(mastodon-tl--byline toot
'mastodon-tl--byline-author
'mastodon-tl--byline-boosted))
- "(B) Account 42 (@acct42@example.space) 2999-99-99 00:11:22
- ------------
-")))))
+ (concat "(B) Account 42 (@acct42@example.space) 2999-99-99 00:11:22
+ "
+ mastodon-tl--horiz-bar "
+"))))))
(ert-deftest mastodon-tl--byline-favorited ()
"Should format the favourited toot correctly."
@@ -378,9 +381,10 @@ Strict-Transport-Security: max-age=31536000
(mastodon-tl--byline toot
'mastodon-tl--byline-author
'mastodon-tl--byline-boosted))
- "(F) Account 42 (@acct42@example.space) 2999-99-99 00:11:22
- ------------
-")))))
+ (concat "(F) Account 42 (@acct42@example.space) 2999-99-99 00:11:22
+ "
+ mastodon-tl--horiz-bar "
+"))))))
(ert-deftest mastodon-tl--byline-boosted/favorited ()
@@ -401,9 +405,10 @@ Strict-Transport-Security: max-age=31536000
(mastodon-tl--byline toot
'mastodon-tl--byline-author
'mastodon-tl--byline-boosted))
- "(?) (?) Account 42 (@acct42@example.space) 2999-99-99 00:11:22
- ------------
-")))))
+ (concat "(?) (?) Account 42 (@acct42@example.space) 2999-99-99 00:11:22
+ "
+ mastodon-tl--horiz-bar "
+"))))))
(ert-deftest mastodon-tl--byline-reblogged ()
"Should format the reblogged toot correctly."
@@ -427,10 +432,10 @@ Strict-Transport-Security: max-age=31536000
(handle1-location 20)
(handle2-location 65))
(should (string= (substring-no-properties byline)
- "Account 42 (@acct42@example.space)
+ (concat "Account 42 (@acct42@example.space)
Boosted Account 43 (@acct43@example.space) original time
- ------------
-"))
+ " mastodon-tl--horiz-bar "
+")))
(should (eq (get-text-property handle1-location 'mastodon-tab-stop byline)
'user-handle))
(should (equal (get-text-property handle1-location 'help-echo byline)
@@ -461,10 +466,10 @@ Strict-Transport-Security: max-age=31536000
(mastodon-tl--byline toot
'mastodon-tl--byline-author
'mastodon-tl--byline-boosted))
- "Account 42 (@acct42@example.space)
+ (concat "Account 42 (@acct42@example.space)
Boosted Account 43 (@acct43@example.space) original time
- ------------
-")))))
+ " mastodon-tl--horiz-bar "
+"))))))
(ert-deftest mastodon-tl--byline-reblogged-boosted/favorited ()
"Should format the reblogged toot that was also boosted & favoritedcorrectly."
@@ -490,10 +495,10 @@ Strict-Transport-Security: max-age=31536000
(mastodon-tl--byline toot
'mastodon-tl--byline-author
'mastodon-tl--byline-boosted))
- "(?) (?) Account 42 (@acct42@example.space)
+ (concat "(?) (?) Account 42 (@acct42@example.space)
Boosted Account 43 (@acct43@example.space) original time
- ------------
-")))))
+ " mastodon-tl--horiz-bar "
+"))))))
(ert-deftest mastodon-tl--byline-timestamp-has-relative-display ()
"Should display the timestamp with a relative time."
@@ -829,8 +834,8 @@ Strict-Transport-Security: max-age=31536000
(defun tl-tests--property-values-at (property ranges)
"Returns a list with property values at the given ranges.
- The property value for PROPERTY within a region is assumed to be
- constant."
+ The property value for PROPERTY within a region is assumed to be
+ constant."
(let (result)
(dolist (range ranges (nreverse result))
(push (get-text-property (car range) property) result))))