From d2ed48a80955680713698022db580094453c658a Mon Sep 17 00:00:00 2001 From: Elis Axelsson Date: Mon, 15 May 2017 19:11:58 +0200 Subject: [PATCH] Added unit test for appending of language to returning links --- test/webpaste-test.el | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/test/webpaste-test.el b/test/webpaste-test.el index 0a46445..6b713c4 100644 --- a/test/webpaste-test.el +++ b/test/webpaste-test.el @@ -110,7 +110,16 @@ (let ((webpaste/open-in-browser t)(webpaste-test/opened-in-browser nil)) (webpaste-return-url "https://example.com/") - (should (equal webpaste-test/opened-in-browser t))))) + (should (equal webpaste-test/opened-in-browser t)))) + + ;; Test appending of language to links when returning + (let ((webpaste/provider-separators + '(("https://example.com/" . "?lang="))) + (webpaste/provider-lang-alists + '(("https://example.com/" . ((fundamental-mode . "text")))))) + + (should (equal (webpaste-return-url "https://example.com/") + "Added \"https://example.com/?lang=text\" to kill ring."))))