- (yas/saving-variables\r
- (with-snippet-dirs\r
- '((".emacs.d/snippets"\r
- ("c-mode"\r
- (".yas-parents" . "cc-mode")\r
- ("printf" . "printf($1);"))\r
- ("emacs-lisp-mode" ("ert-deftest" . "(ert-deftest ${1:name} () $0)"))\r
- ("lisp-interaction-mode" (".yas-parents" . "emacs-lisp-mode")))\r
- ("library/snippets"\r
- ("c-mode" (".yas-parents" . "c++-mode"))\r
- ("cc-mode" ("def" . "# define"))\r
- ("emacs-lisp-mode" ("dolist" . "(dolist)"))\r
- ("lisp-interaction-mode" ("sc" . "brother from another mother"))))\r
- (yas/reload-all)\r
- (with-temp-buffer\r
- (should (= 4 (hash-table-count yas/scheduled-jit-loads)))\r
- (should (= 0 (hash-table-count yas/tables)))\r
- (lisp-interaction-mode) (yas/minor-mode 1) ;; either one will load two tables depending on yas/global-mode (FIXME)\r
- (should (= 2 (hash-table-count yas/scheduled-jit-loads)))\r
- (should (= 2 (hash-table-count yas/tables)))\r
- (should (= 1 (hash-table-count (yas/table-uuidhash (gethash 'lisp-interaction-mode yas/tables)))))\r
- (should (= 2 (hash-table-count (yas/table-uuidhash (gethash 'emacs-lisp-mode yas/tables)))))\r
- (yas/should-expand '(("sc" . "brother from another mother")\r
- ("dolist" . "(dolist)")\r
- ("ert-deftest" . "(ert-deftest name () )")))\r
- (c-mode)\r
- (yas/minor-mode 1)\r
- (yas/should-expand '(("printf" . "printf();")\r
- ("def" . "# define")))\r
- (yas/should-not-expand '("sc" "dolist" "ert-deftest"))))))\r
+ (with-temp-buffer\r
+ (should (= 4 (hash-table-count yas/scheduled-jit-loads)))\r
+ (should (= 0 (hash-table-count yas/tables)))\r
+ (lisp-interaction-mode)\r
+ (yas/minor-mode 1)\r
+ (should (= 2 (hash-table-count yas/scheduled-jit-loads)))\r
+ (should (= 2 (hash-table-count yas/tables)))\r
+ (should (= 1 (hash-table-count (yas/table-uuidhash (gethash 'lisp-interaction-mode yas/tables)))))\r
+ (should (= 2 (hash-table-count (yas/table-uuidhash (gethash 'emacs-lisp-mode yas/tables)))))\r
+ (yas/should-expand '(("sc" . "brother from another mother")\r
+ ("dolist" . "(dolist)")\r
+ ("ert-deftest" . "(ert-deftest name () )")))\r
+ (c-mode)\r
+ (yas/minor-mode 1)\r
+ (should (= 0 (hash-table-count yas/scheduled-jit-loads)))\r
+ (should (= 4 (hash-table-count yas/tables)))\r
+ (should (= 1 (hash-table-count (yas/table-uuidhash (gethash 'c-mode yas/tables)))))\r
+ (should (= 1 (hash-table-count (yas/table-uuidhash (gethash 'cc-mode yas/tables)))))\r
+ (yas/should-expand '(("printf" . "printf();")\r
+ ("def" . "# define")))\r
+ (yas/should-not-expand '("sc" "dolist" "ert-deftest"))))\r