From 948a441f4b81701a8eb3460116dca547a42dffac Mon Sep 17 00:00:00 2001 From: hubisan Date: Sun, 28 Apr 2024 16:04:05 +0200 Subject: [PATCH] working on tests --- Eldev | 5 ++++- tests/test-woerterbuch.el | 2 -- woerterbuch.el | 6 ++++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Eldev b/Eldev index 3209025..000d362 100644 --- a/Eldev +++ b/Eldev @@ -9,7 +9,10 @@ (eldev-add-loading-roots 'test "tests") ;; I need this for testing interactive functions. -(eldev-add-extra-dependencies 'test 'with-simulated-input) +;; Version from nongnu-elpa sometimes gives me an error on Emacs 30 about the +;; signature not being correct. +(eldev-add-extra-dependencies 'test + '(:package with-simulated-input :archive melpa)) ;; Tell checkdoc not to demand two spaces after a period. (setq sentence-end-double-space nil) diff --git a/tests/test-woerterbuch.el b/tests/test-woerterbuch.el index 959e696..f8f56bf 100644 --- a/tests/test-woerterbuch.el +++ b/tests/test-woerterbuch.el @@ -60,8 +60,6 @@ ;; - Katze because it has those strange links with (1), (b) etc. ;; - test a word without defintions (word that doesn't exists on dwds) - - (describe "Definitions:" :var* (;; Create a buffer with the content of a dwsds definitions page ;; stored as a text-file. It is not a good idea to get the content diff --git a/woerterbuch.el b/woerterbuch.el index 16030ff..7092ccd 100644 --- a/woerterbuch.el +++ b/woerterbuch.el @@ -521,7 +521,9 @@ Each list consist of the synonyms for one meaning of the word. Returns a cons with car being the word and cdr the synonyms. The word is returned as it can differntiate from the WORD used as parameter when a baseform is used to retrieve the synonyms. -Returns nil if no synonyms are retrieved." +Returns nil if no synonyms are retrieved +If CLEAN is non-nil `woerterbuch--synonyms-clean-text' is called to clean the +synonyms. Additional information in parantheses is removed." (let* ((raw-synonyms (woerterbuch--synonyms-retrieve-raw word)) (baseform (when raw-synonyms (woerterbuch--synonyms-baseform raw-synonyms)))) @@ -589,7 +591,7 @@ Returns nil if no synonym was selected." (user-error "No synonyms found for %s" word))) (defun woerterbuch--synonyms-wiktionary-retrieve-as-string (word) - "Get a list of synonyms from wiktionary for WORD in org-mode syntax. + "Get a list of synonyms from wiktionary for WORD in `org-mode' syntax. The WORD needs to be in baseform." (let* ((url (format woerterbuch--synonyms-wiktionary-url (url-hexify-string (string-trim word))))