From 43a82661831aa7d1fd019484789c2cf113f3a0a4 Mon Sep 17 00:00:00 2001 From: Spencer Williams <spnw@plexwave.org> Date: Mon, 7 Apr 2025 22:54:14 -0400 Subject: Update changelog --- CHANGES.org | 3 +++ lisp/seam-test.el | 14 ++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/CHANGES.org b/CHANGES.org index c3dbca0..bee357b 100644 --- a/CHANGES.org +++ b/CHANGES.org @@ -32,3 +32,6 @@ - Buffer titles are now set correctly from narrowed buffers. - An issue with regexp escape sequences being interpreted in template variable replacements has been fixed. +- Seam now validates note types entered with =C-u seam-set-note-type=, + averting any mishaps if your completing-read function returns an + invalid type. diff --git a/lisp/seam-test.el b/lisp/seam-test.el index e7658dd..5d4a562 100644 --- a/lisp/seam-test.el +++ b/lisp/seam-test.el @@ -358,6 +358,20 @@ backlink." (insert-file-contents "html/bar.html") (re-search-forward "<a href=\"/foo.html\">"))))) +(ert-deftest seam-test-backlinks-comment () + "Test that a commented-out link does not add a backlink." + :expected-result :failed + (should-error + (identity + (seam-test-with-notes ((seam-export-template-string "{{backlinks}}")) + ((foo "foo" "public") + (bar "bar" "public")) + (with-current-buffer foo + (seam-test-add-contents foo (concat "# " (seam-test-link-to-buffer bar)))) + (with-temp-buffer + (insert-file-contents "html/bar.html") + (re-search-forward "<a href=\"/foo.html\">")))))) + (ert-deftest seam-test-set-type-private () "Test that setting a public note to private will delete its HTML file and update linking HTML files such that they no longer link to it." -- cgit v1.2.3