[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/webpaste 410e286 152/298: Added webpaste confirmation test
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/webpaste 410e286 152/298: Added webpaste confirmation tests |
Date: |
Thu, 9 Dec 2021 19:00:04 -0500 (EST) |
branch: elpa/webpaste
commit 410e286464b7f20c9a87d52cbaa268293f20afbb
Author: Nathan Aclander <naclander@linux.ucla.edu>
Commit: Nathan Aclander <naclander@linux.ucla.edu>
Added webpaste confirmation tests
---
test/webpaste-test.el | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/test/webpaste-test.el b/test/webpaste-test.el
index 056735a..7a0f0ec 100644
--- a/test/webpaste-test.el
+++ b/test/webpaste-test.el
@@ -63,7 +63,26 @@
;; Test so webpaste-paste-region selects the same part of the buffer as
to
;; be expected.
(should (equal (webpaste-paste-region 10 100)
- (buffer-substring 10 100))))))
+ (buffer-substring 10 100)))
+
+ ;; Test when wanting a paste confirmation
+ (let ((webpaste/paste-confirmation t))
+
+ ;; Override yes-or-no-p to immitate "yes" response
+ (cl-letf (((symbol-function 'yes-or-no-p) (lambda (text) t)))
+
+ (should (equal (webpaste-paste-buffer) (buffer-string)))
+
+ (should (equal (webpaste-paste-region 10 100)
+ (buffer-substring 10 100))))
+
+ ;; Override yes-or-no-p to immitate "no" response
+ (cl-letf (((symbol-function 'yes-or-no-p) (lambda (text) nil)))
+
+ (should (not (equal (webpaste-paste-buffer) (buffer-string))))
+
+ (should (not (equal (webpaste-paste-region 10 100)
+ (buffer-substring 10 100)))))))))
- [nongnu] elpa/webpaste 7f62fed 118/298: Tidy up some lists in tests with backquotes, (continued)
- [nongnu] elpa/webpaste 7f62fed 118/298: Tidy up some lists in tests with backquotes, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 0e4ac51 132/298: Added support for buffer-language depending on mode for some providers, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 9ddc617 133/298: Simplify webpaste/get-lang-alist-with-overrides implementation, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste f08a2dc 136/298: Rename internal variable, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste af0474e 139/298: Merge branch 'naclander-master', ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste b9b2ce0 143/298: Added support for languages for providers that appends language to the URL, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste c091dab 146/298: Change some types based on actual use, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 0144016 147/298: Remove unused variable, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste b5491ab 150/298: Bump version for stable release, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 29d10d7 151/298: Added paste.pound-python.org as provider, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 410e286 152/298: Added webpaste confirmation tests,
ELPA Syncer <=
- [nongnu] elpa/webpaste db8c605 154/298: Rewrite test to cover both if link is opened in external browser or not, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 6b93c89 153/298: Merge branch 'naclander-master', ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste d2ed48a 156/298: Added unit test for appending of language to returning links, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 899e08e 157/298: Change install method of emacs in travis for faster build times, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste e87a37c 158/298: Switched from ert to buttercup for testing, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 865ff10 159/298: Disable this test for now since it breaks, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 59fd22f 161/298: Merge branch 'naclander-POST-bug', ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste d475f02 170/298: Added integration test for ptpb.pw, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 95de0b8 169/298: Remove sync as a provider parameter on creation and add it on execution, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste fd4332a 172/298: Merge branch 'test-providers-on-travis', ELPA Syncer, 2021/12/09