X-Git-Url: https://code.delx.au/gnu-emacs-elpa/blobdiff_plain/12b7f82dd8cdac4dc577b6a0b6a91b71b1e61142..146b161112b68c99ecd607ec5360accc1f4db3cd:/yasnippet-tests.el diff --git a/yasnippet-tests.el b/yasnippet-tests.el index d2f3c2cae..8ba4632d3 100644 --- a/yasnippet-tests.el +++ b/yasnippet-tests.el @@ -1,6 +1,6 @@ -;;; yasnippet-tests.el --- some yasnippet tests +;;; yasnippet-tests.el --- some yasnippet tests -*- lexical-binding: t -*- -;; Copyright (C) 2012 João Távora +;; Copyright (C) 2012, 2013, 2014, 2015 Free Software Foundation, Inc. ;; Author: João Távora ;; Keywords: emulations, convenience @@ -27,6 +27,7 @@ (require 'yasnippet) (require 'ert) (require 'ert-x) +(require 'cl) ;;; Snippet mechanics @@ -53,7 +54,7 @@ (yas-expand-snippet "${1:brother} from another $1") (should (string= (yas--buffer-contents) "brother from another brother")) - (ert-simulate-command `(yas-mock-insert "bla")) + (yas-mock-insert "bla") (should (string= (yas--buffer-contents) "bla from another bla")))) @@ -63,17 +64,37 @@ (yas-expand-snippet "${1:brother} from another ${1:$(upcase yas-text)}") (should (string= (yas--buffer-contents) "brother from another BROTHER")) - (ert-simulate-command `(yas-mock-insert "bla")) + (yas-mock-insert "bla") (should (string= (yas--buffer-contents) "bla from another BLA")))) +(ert-deftest mirror-with-transformation-and-autofill () + "Test interaction of autofill with mirror transforms" + (let ((words "one two three four five") + filled-words) + (with-temp-buffer + (c-mode) ; In `c-mode' filling comments works by narrowing. + (yas-minor-mode +1) + (setq fill-column 10) + (auto-fill-mode +1) + (yas-expand-snippet "/* $0\n */") + (yas-mock-insert words) + (setq filled-words (delete-and-extract-region (point-min) (point-max))) + (yas-expand-snippet "/* $1\n */\n$2$2") + (should (string= (yas--buffer-contents) + "/* \n */\n")) + (yas-mock-insert words) + (should (string= (yas--buffer-contents) + (concat filled-words "\n")))))) + + (ert-deftest primary-field-transformation () (with-temp-buffer (yas-minor-mode 1) (let ((snippet "${1:$$(upcase yas-text)}${1:$(concat \"bar\" yas-text)}")) (yas-expand-snippet snippet) (should (string= (yas--buffer-contents) "bar")) - (ert-simulate-command `(yas-mock-insert "foo")) + (yas-mock-insert "foo") (should (string= (yas--buffer-contents) "FOObarFOO"))))) (ert-deftest nested-placeholders-kill-superfield () @@ -82,7 +103,7 @@ (yas-expand-snippet "brother from ${2:another ${3:mother}}!") (should (string= (yas--buffer-contents) "brother from another mother!")) - (ert-simulate-command `(yas-mock-insert "bla")) + (yas-mock-insert "bla") (should (string= (yas--buffer-contents) "brother from bla!")))) @@ -91,7 +112,7 @@ (yas-minor-mode 1) (yas-expand-snippet "brother from ${2:another ${3:mother}}!") (ert-simulate-command '(yas-next-field-or-maybe-expand)) - (ert-simulate-command `(yas-mock-insert "bla")) + (yas-mock-insert "bla") (should (string= (yas--buffer-contents) "brother from another bla!")))) @@ -101,7 +122,7 @@ (yas-expand-snippet "<%= f.submit \"${1:Submit}\"${2:$(and (yas-text) \", :disable_with => '\")}${2:$1ing...}${2:$(and (yas-text) \"'\")} %>") (should (string= (yas--buffer-contents) "<%= f.submit \"Submit\", :disable_with => 'Submiting...' %>")) - (ert-simulate-command `(yas-mock-insert "Send")) + (yas-mock-insert "Send") (should (string= (yas--buffer-contents) "<%= f.submit \"Send\", :disable_with => 'Sending...' %>")))) @@ -109,19 +130,118 @@ (with-temp-buffer (yas-minor-mode 1) (yas-expand-snippet "${1:FOOOOOOO}${2:$1}${3:$2}${4:$3}") - (ert-simulate-command `(yas-mock-insert "abc")) + (yas-mock-insert "abc") (should (string= (yas--buffer-contents) "abcabcabcabc")))) +(ert-deftest delete-numberless-inner-snippet-issue-562 () + (with-temp-buffer + (yas-minor-mode 1) + (yas-expand-snippet "${3:${test}bla}$0${2:ble}") + (ert-simulate-command '(yas-next-field-or-maybe-expand)) + (should (looking-at "testblable")) + (ert-simulate-command '(yas-next-field-or-maybe-expand)) + (ert-simulate-command '(yas-skip-and-clear-or-delete-char)) + (should (looking-at "ble")) + (should (null (yas--snippets-at-point))))) + +(ert-deftest ignore-trailing-whitespace () + (should (equal + (with-temp-buffer + (insert "# key: foo\n# --\nfoo") + (yas--parse-template)) + (with-temp-buffer + (insert "# key: foo \n# --\nfoo") + (yas--parse-template))))) + ;; (ert-deftest in-snippet-undo () ;; (with-temp-buffer ;; (yas-minor-mode 1) ;; (yas-expand-snippet "brother from ${2:another ${3:mother}}!") ;; (ert-simulate-command '(yas-next-field-or-maybe-expand)) -;; (ert-simulate-command `(yas-mock-insert "bla")) +;; (yas-mock-insert "bla") ;; (ert-simulate-command '(undo)) ;; (should (string= (yas--buffer-contents) ;; "brother from another mother!")))) +(ert-deftest dont-clear-on-partial-deletion-issue-515 () + "Ensure fields are not cleared when user doesn't really mean to." + (with-temp-buffer + (yas-minor-mode 1) + (yas-expand-snippet "my ${1:kid brother} from another ${2:mother}") + + (ert-simulate-command '(kill-word 1)) + (ert-simulate-command '(delete-char 1)) + + (should (string= (yas--buffer-contents) + "my brother from another mother")) + (should (looking-at "brother")) + + (ert-simulate-command '(yas-next-field)) + (should (looking-at "mother")) + (ert-simulate-command '(yas-prev-field)) + (should (looking-at "brother")))) + +(ert-deftest do-clear-on-yank-issue-515 () + "A yank should clear an unmodified field." + (with-temp-buffer + (yas-minor-mode 1) + (yas-expand-snippet "my ${1:kid brother} from another ${2:mother}") + (yas-mock-yank "little sibling") + (should (string= (yas--buffer-contents) + "my little sibling from another mother")) + (ert-simulate-command '(yas-next-field)) + (ert-simulate-command '(yas-prev-field)) + (should (looking-at "little sibling")))) + +(ert-deftest basic-indentation () + (with-temp-buffer + (ruby-mode) + (yas-minor-mode 1) + (set (make-local-variable 'yas-indent-line) 'auto) + (set (make-local-variable 'yas-also-auto-indent-first-line) t) + (yas-expand-snippet "def ${1:method}${2:(${3:args})}\n$0\nend") + ;; Note that empty line is not indented. + (should (string= "def method(args) + +end" (buffer-string))) + (cl-loop repeat 3 do (ert-simulate-command '(yas-next-field))) + (yas-mock-insert (make-string (random 5) ?\ )) ; purposedly mess up indentation + (yas-expand-snippet "class << ${self}\n $0\nend") + (ert-simulate-command '(yas-next-field)) + (should (string= "def method(args) + class << self + + end +end" (buffer-string))) + (should (= 4 (current-column))))) + +(ert-deftest navigate-a-snippet-with-multiline-mirrors-issue-665 () + "In issue 665, a multi-line mirror is attempted. + +Indentation doesn't (yet) happen on these mirrors, but let this +test guard against any misnavigations that might be introduced by +an incorrect implementation of mirror auto-indentation" + (with-temp-buffer + (ruby-mode) + (yas-minor-mode 1) + (yas-expand-snippet "def initialize(${1:params})\n$2${1:$( +mapconcat #'(lambda (arg) + (format \"@%s = %s\" arg arg)) + (split-string yas-text \", \") + \"\n\")}\nend") + (yas-mock-insert "bla, ble, bli") + (ert-simulate-command '(yas-next-field)) + (let ((expected (mapconcat #'identity + '("@bla = bla" + "[[:blank:]]*@ble = ble" + "[[:blank:]]*@bli = bli") + "\n"))) + (should (looking-at expected)) + (yas-mock-insert "blo") + (ert-simulate-command '(yas-prev-field)) + (ert-simulate-command '(yas-next-field)) + (should (looking-at (concat "blo" expected)))))) + ;;; Snippet expansion and character escaping ;;; Thanks to @zw963 (Billy) for the testing @@ -190,6 +310,7 @@ (ert-deftest be-careful-when-escaping-in-yas-selected-text-2 () (with-temp-buffer + (yas-minor-mode 1) (let ((yas-selected-text "He)}o world!")) (yas-expand-snippet "Look ma! ${1:`(yas-selected-text)`} OK?") (should (string= (yas--buffer-contents) "Look ma! He)}o world! OK?"))))) @@ -201,63 +322,68 @@ (snippet "if ${1:condition}\n`yas-selected-text`\nelse\n$3\nend")) (yas-expand-snippet snippet) (yas-next-field) - (ert-simulate-command `(yas-mock-insert "bbb")) + (yas-mock-insert "bbb") (should (string= (yas--buffer-contents) "if condition\naaa\nelse\nbbb\nend"))))) +(defmacro yas--with-font-locked-temp-buffer (&rest body) + "Like `with-temp-buffer', but ensure `font-lock-mode'." + (declare (indent 0) (debug t)) + (let ((temp-buffer (make-symbol "temp-buffer"))) + ;; NOTE: buffer name must not start with a space, otherwise + ;; `font-lock-mode' doesn't turn on. + `(let ((,temp-buffer (generate-new-buffer "*yas-temp*"))) + (with-current-buffer ,temp-buffer + ;; pretend we're interactive so `font-lock-mode' turns on + (let ((noninteractive nil) + ;; turn on font locking after major mode change + (change-major-mode-after-body-hook #'font-lock-mode)) + (unwind-protect + (progn (require 'font-lock) + ;; turn on font locking before major mode change + (font-lock-mode +1) + ,@body) + (and (buffer-name ,temp-buffer) + (kill-buffer ,temp-buffer)))))))) + +(defmacro yas-saving-variables (&rest body) + `(yas-call-with-saving-variables #'(lambda () ,@body))) + +(defmacro yas-with-snippet-dirs (dirs &rest body) + (declare (indent defun)) + `(yas-call-with-snippet-dirs ,dirs + #'(lambda () + ,@body))) + +(ert-deftest example-for-issue-474 () + (yas--with-font-locked-temp-buffer + (c-mode) + (yas-minor-mode 1) + (insert "#include \n") + (let ((yas-good-grace nil)) (yas-expand-snippet "`\"TODO: \"`")) + (should (string= (yas--buffer-contents) "#include \nTODO: ")))) + (ert-deftest example-for-issue-404 () - (with-temp-buffer + (yas--with-font-locked-temp-buffer (c++-mode) (yas-minor-mode 1) (insert "#include \n") - (let ((snippet "main")) - (let ((yas-good-grace nil)) (yas-expand-snippet snippet)) - (should (string= (yas--buffer-contents) "#include \nmain"))))) + (let ((yas-good-grace nil)) (yas-expand-snippet "main")) + (should (string= (yas--buffer-contents) "#include \nmain")))) (ert-deftest example-for-issue-404-c-mode () - (with-temp-buffer + (yas--with-font-locked-temp-buffer (c-mode) (yas-minor-mode 1) (insert "#include \n") - (let ((snippet "main")) - (let ((yas-good-grace nil)) (yas-expand-snippet snippet)) - (should (string= (yas--buffer-contents) "#include \nmain"))))) - -(ert-deftest example-for-issue-404-external-emacs () - :tags '(:external) - (let ((fixture-el-file (make-temp-file "yas-404-fixture" nil ".el"))) - (with-temp-buffer - (insert (pp-to-string - `(condition-case _ - (progn - (require 'yasnippet-tests) - (yas-with-snippet-dirs - '((".emacs.d/snippets" - ("c-mode" - ("main" . "int main ()")))) - (yas-global-mode) - (switch-to-buffer "foo.c") - (c-mode) - (insert "#include \nmain") - (setq yas-good-grace nil) - (yas-expand) - (should (string= (buffer-string) - "#include \nint main ()")) - (kill-emacs 0))) - (error (kill-emacs -1))))) - (write-file fixture-el-file)) - (should (= 0 - (call-process (concat invocation-directory invocation-name) - nil nil nil - "-Q" "--batch" - "-L" "." "-l" fixture-el-file))))) + (let ((yas-good-grace nil)) (yas-expand-snippet "main")) + (should (string= (yas--buffer-contents) "#include \nmain")))) (ert-deftest middle-of-buffer-snippet-insertion () (with-temp-buffer (yas-minor-mode 1) (insert "beginning") (save-excursion (insert "end")) - (let ((snippet "-middle-")) - (yas-expand-snippet snippet)) + (yas-expand-snippet "-middle-") (should (string= (yas--buffer-contents) "beginning-middle-end")))) (ert-deftest another-example-for-issue-271 () @@ -297,9 +423,9 @@ \"fail\")}")) (yas-expand-snippet snippet) (should (string= (yas--buffer-contents) "fail")) - (ert-simulate-command `(yas-mock-insert "foobaaar")) + (yas-mock-insert "foobaaar") (should (string= (yas--buffer-contents) "foobaaarfail")) - (ert-simulate-command `(yas-mock-insert "baz")) + (yas-mock-insert "baz") (should (string= (yas--buffer-contents) "foobaaarbazok"))))) @@ -317,6 +443,50 @@ TODO: correct this bug!" (should (string= (yas--buffer-contents) "brother from another mother") ;; no newline should be here! ))) + +(defvar yas--barbaz) +(defvar yas--foobarbaz) + +;; See issue #497. To understand this test, follow the example of the +;; `yas-key-syntaxes' docstring. +;; +(ert-deftest complicated-yas-key-syntaxes () + (with-temp-buffer + (yas-saving-variables + (yas-with-snippet-dirs + '((".emacs.d/snippets" + ("emacs-lisp-mode" + ("foo-barbaz" . "# condition: yas--foobarbaz\n# --\nOKfoo-barbazOK") + ("barbaz" . "# condition: yas--barbaz\n# --\nOKbarbazOK") + ("baz" . "OKbazOK") + ("'quote" . "OKquoteOK")))) + (yas-reload-all) + (emacs-lisp-mode) + (yas-minor-mode-on) + (let ((yas-key-syntaxes '("w" "w_"))) + (let ((yas--barbaz t)) + (yas-should-expand '(("foo-barbaz" . "foo-OKbarbazOK") + ("barbaz" . "OKbarbazOK")))) + (let ((yas--foobarbaz t)) + (yas-should-expand '(("foo-barbaz" . "OKfoo-barbazOK")))) + (let ((yas-key-syntaxes + (cons #'(lambda (_start-point) + (unless (looking-back "-") + (backward-char) + 'again)) + yas-key-syntaxes)) + (yas--foobarbaz t)) + (yas-should-expand '(("foo-barbaz" . "foo-barOKbazOK"))))) + (let ((yas-key-syntaxes '(yas-try-key-from-whitespace))) + (yas-should-expand '(("xxx\n'quote" . "xxx\nOKquoteOK") + ("xxx 'quote" . "xxx OKquoteOK")))) + (let ((yas-key-syntaxes '(yas-shortest-key-until-whitespace)) + (yas--foobarbaz t) (yas--barbaz t)) + (yas-should-expand '(("foo-barbaz" . "foo-barOKbazOK"))) + (setq yas-key-syntaxes '(yas-longest-key-from-whitespace)) + (yas-should-expand '(("foo-barbaz" . "OKfoo-barbazOK") + ("foo " . "foo ")))))))) + ;;; Loading ;;; @@ -384,6 +554,14 @@ TODO: correct this bug!" ("lisp-interaction-mode" ("sc" . "brother from another mother")))) ,@body)))) +(ert-deftest snippet-lookup () + "Test `yas-lookup-snippet'." + (yas-with-some-interesting-snippet-dirs + (yas-reload-all 'no-jit) + (should (equal (yas-lookup-snippet "printf" 'c-mode) "printf($1);")) + (should (equal (yas-lookup-snippet "def" 'c-mode) "# define")) + (should-not (yas-lookup-snippet "no such snippet" nil 'noerror)) + (should-not (yas-lookup-snippet "printf" 'emacs-lisp-mode 'noerror)))) (ert-deftest basic-jit-loading () "Test basic loading and expansion of snippets" @@ -392,7 +570,7 @@ TODO: correct this bug!" (yas--basic-jit-loading-1))) (ert-deftest basic-jit-loading-with-compiled-snippets () - "Test basic loading and expansion of snippets" + "Test basic loading and expansion of compiled snippets" (yas-with-some-interesting-snippet-dirs (yas-reload-all) (yas-recompile-all) @@ -402,6 +580,20 @@ TODO: correct this bug!" (yas-reload-all) (yas--basic-jit-loading-1)))) +(ert-deftest visiting-compiled-snippets () + "Test snippet visiting for compiled snippets." + (yas-with-some-interesting-snippet-dirs + (yas-recompile-all) + (yas-reload-all 'no-jit) ; must be loaded for `yas-lookup-snippet' to work. + (yas--with-temporary-redefinitions ((find-file-noselect + (filename &rest _) + (throw 'yas-snippet-file filename))) + (should (string-suffix-p + "cc-mode/def" + (catch 'yas-snippet-file + (yas--visit-snippet-file-1 + (yas--lookup-snippet-1 "def" 'cc-mode)))))))) + (ert-deftest loading-with-cyclic-parenthood () "Test loading when cyclic parenthood is setup." (yas-saving-variables @@ -420,15 +612,81 @@ TODO: correct this bug!" yet-another-c-mode and-also-this-one and-that-one - ;; prog-mode doesn't exit in emacs 24.3 + ;; prog-mode doesn't exist in emacs 24.3 ,@(if (fboundp 'prog-mode) '(prog-mode)) emacs-lisp-mode lisp-interaction-mode)) (observed (yas--modes-to-activate))) - (should (null (cl-set-exclusive-or expected observed))) - (should (= (length expected) - (length observed)))))))) + (should (equal major-mode (car observed))) + (should (equal (sort expected #'string<) (sort observed #'string<)))))))) + +(ert-deftest extra-modes-parenthood () + "Test activation of parents of `yas--extra-modes'." + (yas-saving-variables + (yas-with-snippet-dirs '((".emacs.d/snippets" + ("c-mode" + (".yas-parents" . "cc-mode")) + ("yet-another-c-mode" + (".yas-parents" . "c-mode and-also-this-one lisp-interaction-mode")))) + (yas-reload-all) + (with-temp-buffer + (yas-activate-extra-mode 'c-mode) + (yas-activate-extra-mode 'yet-another-c-mode) + (yas-activate-extra-mode 'and-that-one) + (let* ((expected-first `(and-that-one + yet-another-c-mode + c-mode + ,major-mode)) + (expected-rest `(cc-mode + ;; prog-mode doesn't exist in emacs 24.3 + ,@(if (fboundp 'prog-mode) + '(prog-mode)) + emacs-lisp-mode + and-also-this-one + lisp-interaction-mode)) + (observed (yas--modes-to-activate))) + (should (equal expected-first + (cl-subseq observed 0 (length expected-first)))) + (should (equal (sort expected-rest #'string<) + (sort (cl-subseq observed (length expected-first)) #'string<)))))))) + +(defalias 'yas--phony-c-mode 'c-mode) + +(ert-deftest issue-492-and-494 () + (define-derived-mode yas--test-mode yas--phony-c-mode "Just a test mode") + (yas-with-snippet-dirs '((".emacs.d/snippets" + ("yas--test-mode"))) + (yas-reload-all) + (with-temp-buffer + (let* ((major-mode 'yas--test-mode) + (expected `(c-mode + ,@(if (fboundp 'prog-mode) + '(prog-mode)) + yas--phony-c-mode + yas--test-mode)) + (observed (yas--modes-to-activate))) + (should (null (cl-set-exclusive-or expected observed))) + (should (= (length expected) + (length observed))))))) + +(define-derived-mode yas--test-mode c-mode "Just a test mode") +(define-derived-mode yas--another-test-mode c-mode "Another test mode") + +(ert-deftest issue-504-tricky-jit () + (yas-with-snippet-dirs + '((".emacs.d/snippets" + ("yas--another-test-mode" + (".yas-parents" . "yas--test-mode")) + ("yas--test-mode"))) + (let ((b (with-current-buffer (generate-new-buffer "*yas-test*") + (yas--another-test-mode) + (current-buffer)))) + (unwind-protect + (progn + (yas-reload-all) + (should (= 0 (hash-table-count yas--scheduled-jit-loads)))) + (kill-buffer b))))) (defun yas--basic-jit-loading-1 () (with-temp-buffer @@ -600,7 +858,11 @@ TODO: be meaner" (yas-reload-all) (should (not (eq (key-binding (yas--read-keybinding "TAB")) 'yas-expand))) (should (eq (key-binding (yas--read-keybinding "SPC")) 'yas-expand)))) - (setcdr yas-minor-mode-map (cdr (yas--init-minor-keymap))))) + ;; FIXME: actually should restore to whatever saved values where there. + ;; + (define-key yas-minor-mode-map [tab] 'yas-expand) + (define-key yas-minor-mode-map (kbd "TAB") 'yas-expand) + (define-key yas-minor-mode-map (kbd "SPC") nil))) (ert-deftest test-yas-in-org () (with-temp-buffer @@ -642,7 +904,11 @@ add the snippets associated with the given mode." (insert (car key-and-expansion)) (let ((yas-fallback-behavior nil)) (ert-simulate-command '(yas-expand))) - (should (string= (yas--buffer-contents) (cdr key-and-expansion)))) + (unless (string= (yas--buffer-contents) (cdr key-and-expansion)) + (ert-fail (format "\"%s\" should have expanded to \"%s\" but got \"%s\"" + (car key-and-expansion) + (cdr key-and-expansion) + (yas--buffer-contents))))) (yas-exit-all-snippets)) (defun yas-should-not-expand (keys) @@ -652,13 +918,19 @@ add the snippets associated with the given mode." (insert key) (let ((yas-fallback-behavior nil)) (ert-simulate-command '(yas-expand))) - (should (string= (yas--buffer-contents) key)))) + (unless (string= (yas--buffer-contents) key) + (ert-fail (format "\"%s\" should have stayed put, but instead expanded to \"%s\"" + key + (yas--buffer-contents)))))) (defun yas-mock-insert (string) - (interactive) - (do ((i 0 (1+ i))) - ((= i (length string))) - (insert (aref string i)))) + (dotimes (i (length string)) + (let ((last-command-event (aref string i))) + (ert-simulate-command '(self-insert-command 1))))) + +(defun yas-mock-yank (string) + (let ((interprogram-paste-function (lambda () string))) + (ert-simulate-command '(yank nil)))) (defun yas-make-file-or-dirs (ass) (let ((file-or-dir-name (car ass)) @@ -692,10 +964,6 @@ add the snippets associated with the given mode." for saved in saved-values do (set var saved))))) -(defmacro yas-saving-variables (&rest body) - `(yas-call-with-saving-variables #'(lambda () ,@body))) - - (defun yas-call-with-snippet-dirs (dirs fn) (let* ((default-directory (make-temp-file "yasnippet-fixture" t)) (yas-snippet-dirs (mapcar #'car dirs))) @@ -707,18 +975,23 @@ add the snippets associated with the given mode." (when (>= emacs-major-version 24) (delete-directory default-directory 'recursive)))))) -(defmacro yas-with-snippet-dirs (dirs &rest body) - (declare (indent defun)) - `(yas-call-with-snippet-dirs ,dirs - #'(lambda () - ,@body))) - ;;; Older emacsen ;;; (unless (fboundp 'special-mode) ;; FIXME: Why provide this default definition here?!? (defalias 'special-mode 'fundamental)) +(unless (fboundp 'string-suffix-p) + ;; introduced in Emacs 24.4 + (defun string-suffix-p (suffix string &optional ignore-case) + "Return non-nil if SUFFIX is a suffix of STRING. +If IGNORE-CASE is non-nil, the comparison is done without paying +attention to case differences." + (let ((start-pos (- (length string) (length suffix)))) + (and (>= start-pos 0) + (eq t (compare-strings suffix nil nil + string start-pos nil ignore-case)))))) + ;;; btw to test this in emacs22 mac osx: ;;; curl -L -O https://github.com/mirrors/emacs/raw/master/lisp/emacs-lisp/ert.el ;;; curl -L -O https://github.com/mirrors/emacs/raw/master/lisp/emacs-lisp/ert-x.el @@ -738,8 +1011,8 @@ add the snippets associated with the given mode." (provide 'yasnippet-tests) -;;; yasnippet-tests.el ends here ;; Local Variables: -;; lexical-binding: t +;; indent-tabs-mode: nil ;; byte-compile-warnings: (not cl-functions) ;; End: +;;; yasnippet-tests.el ends here