aboutsummaryrefslogtreecommitdiff
path: root/tests/test-org-drill-statistics-render-attention.el
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-org-drill-statistics-render-attention.el')
-rw-r--r--tests/test-org-drill-statistics-render-attention.el12
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/test-org-drill-statistics-render-attention.el b/tests/test-org-drill-statistics-render-attention.el
index b3f2375..4adcfcc 100644
--- a/tests/test-org-drill-statistics-render-attention.el
+++ b/tests/test-org-drill-statistics-render-attention.el
@@ -65,8 +65,9 @@ current time so the fixture never hardcodes today."
(test-org-drill-stats--attn-fixture)
(let ((out (org-drill-statistics--render-attention 'file)))
(should (string-match-p "| Card |" out))
- (should (string-match-p "\\[\\[org-drill-card:[0-9]+\\]\\[Leech 00\\]\\]"
- out)))))
+ (should (string-match-p
+ "\\[\\[org-drill-card:[0-9]+@[^]]*\\]\\[Leech 00\\]\\]"
+ out)))))
(ert-deftest test-org-drill-statistics-attention-cap-and-footer ()
"Twelve leeches over a 10 cap show 10 rows and a +2 more footer."
@@ -126,15 +127,16 @@ current time so the fixture never hardcodes today."
(ert-deftest test-org-drill-statistics-card-link-sanitizes-brackets ()
"Closing brackets in a heading cannot terminate the link early."
(let ((link (org-drill-statistics--card-link "a]] b" 42)))
- (should (string-prefix-p "[[org-drill-card:42][" link))
+ (should (string-prefix-p "[[org-drill-card:42@][" link))
(should (string-suffix-p "]]" link))
(should-not (string-match-p "a]] b" link))))
(ert-deftest test-org-drill-statistics-card-link-empty-heading-fallback ()
"An empty heading falls back to a position-based description."
(let ((link (org-drill-statistics--card-link "" 99)))
- (should (string-match-p "\\[\\[org-drill-card:99\\]\\[card at 99\\]\\]"
- link))))
+ (should (string-match-p
+ "\\[\\[org-drill-card:99@[^]]*\\]\\[card at 99\\]\\]"
+ link))))
(provide 'test-org-drill-statistics-render-attention)