emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/engine-mode 671a16bb53 3/3: Backfill test for :term-transf


From: ELPA Syncer
Subject: [nongnu] elpa/engine-mode 671a16bb53 3/3: Backfill test for :term-transformation-hook
Date: Mon, 19 Jun 2023 13:01:45 -0400 (EDT)

branch: elpa/engine-mode
commit 671a16bb530e00fd8fded26574ef4e936dc594d8
Author: Harry R. Schwartz <hello@harryrschwartz.com>
Commit: Harry R. Schwartz <hello@harryrschwartz.com>

    Backfill test for :term-transformation-hook
---
 engine-mode-test.el | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/engine-mode-test.el b/engine-mode-test.el
index 9ed53cef14..f1a4fb1ee8 100644
--- a/engine-mode-test.el
+++ b/engine-mode-test.el
@@ -88,4 +88,15 @@
               :to-equal
               "Search My-Engine for the selected text.\nPrompt for input if 
none is selected.")))
 
+(describe "defengine"
+          (it "takes a :term-transformation-hook argument and applies it to 
search terms"
+              (defengine wikipedia
+                "https://www.wikipedia.org/search-redirect.php?search=%s";
+                :term-transformation-hook upcase)
+
+              (let ((engine/browser-function (lambda (url &rest _) url)))
+                (expect (engine/search-wikipedia "foo bar")
+                        :to-equal
+                        
"https://www.wikipedia.org/search-redirect.php?search=FOO%20BAR";))))
+
 ;;; engine-mode-test.el ends here



reply via email to

[Prev in Thread] Current Thread [Next in Thread]