[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 1fc3426 02/51: Add test relying on overlay hook inhibition
From: |
Noam Postavsky |
Subject: |
[elpa] master 1fc3426 02/51: Add test relying on overlay hook inhibition in `yas-expand-snippet' |
Date: |
Sun, 13 May 2018 13:11:39 -0400 (EDT) |
branch: master
commit 1fc34266a4b26909c5d3b3b06632be89cd7c4ced
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>
Add test relying on overlay hook inhibition in `yas-expand-snippet'
* yasnippet-tests.el
(insert-snippet-with-backslashes-in-active-field): New test.
---
yasnippet-tests.el | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/yasnippet-tests.el b/yasnippet-tests.el
index fc66de3..f9195db 100644
--- a/yasnippet-tests.el
+++ b/yasnippet-tests.el
@@ -606,6 +606,14 @@ mapconcat #'(lambda (arg)
(yas-expand-snippet "Look ma! ${1:`(yas-selected-text)`} OK?")
(should (string= (yas--buffer-contents) "Look ma! He)}o world! OK?")))))
+(ert-deftest insert-snippet-with-backslashes-in-active-field ()
+ ;; This test case fails if `yas--inhibit-overlay-hooks' is not bound
+ ;; in `yas-expand-snippet' (see Github #844).
+ (with-temp-buffer
+ (yas-minor-mode 1)
+ (yas-expand-snippet "${1:$$(if (not yas-modified-p) \"a\")}")
+ (yas-expand-snippet "\\\\alpha")))
+
(ert-deftest example-for-issue-271 ()
(with-temp-buffer
(yas-minor-mode 1)
- [elpa] master updated (04889dc -> e64297e), Noam Postavsky, 2018/05/13
- [elpa] master ba4e5c1 01/51: * yasnippet-debug.el (yas-debug-snippet): Handle non-numbered fields., Noam Postavsky, 2018/05/13
- [elpa] master 1fc3426 02/51: Add test relying on overlay hook inhibition in `yas-expand-snippet',
Noam Postavsky <=
- [elpa] master ece7935 07/51: * yasnippet.el (yas--message): Fix invalid docstring reference., Noam Postavsky, 2018/05/13
- [elpa] master 4ab9cb5 04/51: Set test to fail with newer org version, Noam Postavsky, 2018/05/13
- [elpa] master 0b8d434 05/51: Unset autoload-compute-prefixes for utility files, Noam Postavsky, 2018/05/13
- [elpa] master acec3ba 06/51: * doc/faq.org: Fix typo., Noam Postavsky, 2018/05/13
- [elpa] master ee81da9 11/51: Allow "# --" end-of-header marker to have trailing space, Noam Postavsky, 2018/05/13
- [elpa] master b1ca219 12/51: Remove submodules (snippet and yasmate), Noam Postavsky, 2018/05/13
- [elpa] master 35a4df7 03/51: Let whitespace-global-mode work in new snippet buffers, Noam Postavsky, 2018/05/13
- [elpa] master d806b04 15/51: * yasnippet.el (snippet-mode): Derive from prog-mode., Noam Postavsky, 2018/05/13
- [elpa] master 1292cd2 10/51: Refactor undo tests, Noam Postavsky, 2018/05/13
- [elpa] master 203059a 17/51: * yasnippet.el (yas-key-syntaxes): Prefer the longest key., Noam Postavsky, 2018/05/13