[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master a4fafc3 16/40: Add test for loading snippet with same uuid
From: |
Noam Postavsky |
Subject: |
[elpa] master a4fafc3 16/40: Add test for loading snippet with same uuid |
Date: |
Wed, 26 Oct 2016 23:06:32 +0000 (UTC) |
branch: master
commit a4fafc32250bf4b3dba1bba8d38ab77703627935
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>
Add test for loading snippet with same uuid
* yasnippet-tests.el (snippet-load-uuid): New test.
---
yasnippet-tests.el | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/yasnippet-tests.el b/yasnippet-tests.el
index 1d56fb8..b0906d5 100644
--- a/yasnippet-tests.el
+++ b/yasnippet-tests.el
@@ -613,6 +613,24 @@ TODO: correct this bug!"
(yas-reload-all)
(yas--basic-jit-loading-1))))
+(ert-deftest snippet-load-uuid ()
+ "Test snippets with same uuid override old ones."
+ (yas-saving-variables
+ (yas-define-snippets
+ 'text-mode
+ '(("1" "one" "one" nil nil nil nil "C-c 1" "uuid-1")
+ ("2" "two" "two" nil nil nil nil nil "uuid-2")))
+ (with-temp-buffer
+ (text-mode)
+ (yas-minor-mode +1)
+ (should (equal (yas-lookup-snippet "one") "one"))
+ (should (eq (key-binding "\C-c1") 'yas-expand-from-keymap))
+ (yas-define-snippets
+ 'text-mode '(("_1" "one!" "won" nil nil nil nil nil "uuid-1")))
+ (should (null (yas-lookup-snippet "one" nil 'noerror)))
+ (should (null (key-binding "\C-c1")))
+ (should (equal (yas-lookup-snippet "won") "one!")))))
+
(ert-deftest visiting-compiled-snippets ()
"Test snippet visiting for compiled snippets."
(yas-with-some-interesting-snippet-dirs
- [elpa] master d218ed8 11/40: Do indent the first line of mirrors, but in correct order, (continued)
- [elpa] master d218ed8 11/40: Do indent the first line of mirrors, but in correct order, Noam Postavsky, 2016/10/26
- [elpa] master 0db65ee 20/40: Don't clobber match data in modification hooks, Noam Postavsky, 2016/10/26
- [elpa] master dc098cf 25/40: Fix yas--message verbosity levels, Noam Postavsky, 2016/10/26
- [elpa] master 5af9276 27/40: Support yas/ symbols in yas-define-menu, Noam Postavsky, 2016/10/26
- [elpa] master ea9581f 22/40: Fix some quoting problems in doc strings, Noam Postavsky, 2016/10/26
- [elpa] master ee6e7a9 09/40: Fix some compilation warnings, Noam Postavsky, 2016/10/26
- [elpa] master 7661dc1 19/40: yasnippet.el (yas-escape-text): No error on nil text, Noam Postavsky, 2016/10/26
- [elpa] master 351c1e3 10/40: Don't indent first line of mirrors, Noam Postavsky, 2016/10/26
- [elpa] master 655bda8 07/40: Merge: restore backquote evaluation behaviour, Noam Postavsky, 2016/10/26
- [elpa] master 8907fd1 14/40: Escape yas-selected-text for new snippet., Noam Postavsky, 2016/10/26
- [elpa] master a4fafc3 16/40: Add test for loading snippet with same uuid,
Noam Postavsky <=
- [elpa] master 8ca8c7d 13/40: Merge: a different fix for #712., Noam Postavsky, 2016/10/26
- [elpa] master 85a43ad 35/40: Explain about backquote expressions in doc, Noam Postavsky, 2016/10/26
- [elpa] master 3129040 24/40: Load snippet after saving, Noam Postavsky, 2016/10/26
- [elpa] master 1532e66 33/40: Fix saving of new snippets, Noam Postavsky, 2016/10/26
- [elpa] master 0ee86a2 23/40: Simplify `yas-new-snippet' load&save logic, Noam Postavsky, 2016/10/26
- [elpa] master 00be21c 36/40: Change cl dep to cl-lib for tests too, Noam Postavsky, 2016/10/26
- [elpa] master 9c9952c 12/40: Add test for indentation of single line mirrors, Noam Postavsky, 2016/10/26
- [elpa] master 4296a86 15/40: yasnippet.el (yas--quote-string): Remove., Noam Postavsky, 2016/10/26
- [elpa] master d4da806 17/40: Fix removal of snippets by uuid, Noam Postavsky, 2016/10/26
- [elpa] master 42b0c26 18/40: Don't warn about modifications to other buffers, Noam Postavsky, 2016/10/26