Files
emacsd/elpa/typescript-mode-20191120.346/typescript-mode-test-utilities.elc

34 lines
3.4 KiB
Plaintext
Raw Normal View History

2019-12-01 19:55:19 +01:00
;ELC
;;; Compiled
;;; in Emacs version 26.3
;;; with all optimizations.
;;; This file uses dynamic docstrings, first added in Emacs 19.29.
;;; This file does not contain utf-8 non-ASCII characters,
;;; and so can be loaded in Emacs versions earlier than 23.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(byte-code "\300\301!\210\300\302!\207" [require ert typescript-mode] 2)
#@63 Fill a temporary buffer with `CONTENT' and eval `BODY' in it.
(defalias 'test-with-temp-buffer '(macro . #[(content &rest body) "\302\303D\304\305\306 BBBBB\207" [content body with-temp-buffer insert (typescript-mode) (goto-char (point-min)) (switch-to-buffer (current-buffer))] 6 (#$ . 481)]))
(byte-code "\300\301\302\303#\210\304\301\305\306#\300\207" [put test-with-temp-buffer edebug-form-spec t function-put lisp-indent-function 1] 4)
#@63 Fill a temporary buffer with `CONTENT' and eval `BODY' in it.
(defalias 'test-with-fontified-buffer '(macro . #[(content &rest body) "\302\303 BBB\207" [content body test-with-temp-buffer (font-lock-fontify-buffer)] 4 (#$ . 929)]))
(byte-code "\300\301\302\303#\210\304\301\305\306#\300\207" [put test-with-fontified-buffer edebug-form-spec t function-put lisp-indent-function 1] 4)
#@109 Get the face at `LOC'.
If it is not a number, then we `re-search-forward' with `LOC'
as the search pattern.
(defalias 'get-face-at #[(loc) "\247\204\212\301!\210\302\224)\303\304\"\207" [loc re-search-forward 0 get-text-property face] 3 (#$ . 1320)])
#@289 Perform a test on our template.
`CONTENTS' is the string to put in the temporary buffer.
`EXPECTED' is the expected results.
It should be a list of (LOCATION . FACE) pairs, where
LOCATION can be either a single location, or list of locations,
that are all expected to have the same face.
(defalias 'font-lock-test #[(contents expected) "\306\307!rq\210\310\216 c\210\311 \210eb\210\312p!\210\313 \210\314d!\210\n\315\211\205\325\f@\211@<\203\211 @\315\211\203\205\f@\316\3171P\320\321 ! A)D0\202]\322@A)D\323\315\324\216\325\"\211)\204y\326!\210)\210+\fA\211\2048*\202\315\316 \3271\237\320\321 @! A)D0\202\254\322 @A)D!\330\"\315#\331\216\325 !\"\211\")\204\310\326#!\210)\"\210+\fA\211\204&\315-\207" [#1=#:temp-buffer contents expected spec --dolist-tail-- source generate-new-buffer " *temp*" #[nil "\301!\205 \302!\207" [#1# buffer-name kill-buffer] 2] typescript-mode switch-to-buffer font-lock-fontify-buffer syntax-propertize nil eq (error) ert--should-signal-hook get-face-at signal #2=#:ert-form-evaluation-aborted-3 #[nil "\305C\306 BD\244\307\n\310\"?\205\311\nD\244\312\313N\211\205\"\314\315 \"D)\244\316\f!\207" [#3=#:fn-0 #4=#:args-1 #5=#:value-2 -explainer- #6=#:form-description-4 (should (eq (get-face-at source) (cdr spec))) :form eql #2# :value eq ert-explainer :explanation apply ert--signal-should-execution] 6] apply ert-fail (error) #7=#:ert-form-evaluation-aborted-8 #[nil "\305C\306 BD\244\307\n\310\"?\205\311\nD\244\312\313N\211\205\"\314\315 \"D)\244\316\f!\207" [#8=#:fn-5 #9=#:args-6 #10=#:value-7 -explainer- #11=#:form-description-9 (should (eq (get-face-at (car spec)) (cdr spec))) :form eql #7# :value eq ert-explainer :explanation apply ert--signal-should-execution] 6] #3# signal-hook-function err #4# #5# #6# #8# #9# #10# #11#] 4 (#$ . 1584)])
(provide 'typescript-mode-test-utilities)