Skip to content

Commit

Permalink
working on tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hubisan committed Apr 28, 2024
1 parent a9042e2 commit 948a441
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
5 changes: 4 additions & 1 deletion Eldev
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 0 additions & 2 deletions tests/test-woerterbuch.el
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions woerterbuch.el
Original file line number Diff line number Diff line change
Expand Up @@ -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))))
Expand Down Expand Up @@ -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))))
Expand Down

0 comments on commit 948a441

Please sign in to comment.