diff options
author | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-04-05 19:53:01 +0200 |
---|---|---|
committer | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-04-05 19:53:29 +0200 |
commit | 6b47afe3fbef88260c0bf14b44e367370684064e (patch) | |
tree | f5e12f590df861204ce7cb9921dc06c02c050534 /test | |
parent | 40a2c91fa7c34be09c2527daf01b9deee7e87f2a (diff) |
fix byline tests w horiz-bar. FIX #428.
Diffstat (limited to 'test')
-rw-r--r-- | test/mastodon-tl-tests.el | 57 |
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)))) |