;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\207" [require flycheck ert macroexp] 2) #@37 Whether ERT supports test skipping. (defconst flycheck-ert-ert-can-skip (fboundp 'ert-skip) (#$ . 175)) (byte-code "\301\302!\204 \303\302\304\"\210\204%\302\305\306\"\210\303\307\310\"\210\303\311\312\313B\"\210\303\314\315\"\210\301\207" [flycheck-ert-ert-can-skip fboundp define-error defalias #[770 "\211\204\300\262\211:\203\301\302\303\304\"\"\202\211\305NB\306\305\307\310B!!#\210\2052\306\311#\207" [error apply append mapcar #[257 "\211\300N\206 \301\302\"B\207" [error-conditions error "Unknown signal `%s'"] 5 "\n\n(fn PARENT)"] error-conditions put delete-dups copy-sequence error-message] 11 "Define NAME as a new error signal.\nMESSAGE is a string that will be output to the echo area if such an error\nis signaled without being caught by a `condition-case'.\nPARENT is either a signal or a list of signals from which it inherits.\nDefaults to `error'.\n\n(fn NAME MESSAGE &optional PARENT)"] flycheck-ert-skipped "Test skipped" ert-skip #[257 "\300\301\"\207" [signal flycheck-ert-skipped] 4 "\n\n(fn DATA)"] skip-unless macro #[257 "\300\301D\302\303\304DEE\207" [unless ignore-errors signal 'flycheck-ert-skipped quote] 7 "\n\n(fn FORM)"] ert-test-skipped-p #[257 "\301!>\205\301!>\204\302\303\304D\"\210\211\305H@\306=\207" [cl-struct-ert-test-failed-tags type-of signal wrong-type-argument ert-test-failed 4 flycheck-ert-skipped] 5 "\n\n(fn RESULT)"]] 4) #@57 The directory to get resources from in this test suite. (defvar flycheck-ert--resource-directory nil (#$ . 1591)) #@226 Eval BODY within a temporary buffer. Like `with-temp-buffer', but resets the modification state of the temporary buffer to make sure that it is properly killed even if it has a backing file and is modified. (fn &rest BODY) (defalias 'flycheck-ert-with-temp-buffer '(macro . #[128 "\300\301\302!\303BBD\207" [with-temp-buffer unwind-protect macroexp-progn ((set-buffer-modified-p nil) (set-visited-file-name nil 'no-query))] 5 (#$ . 1712)])) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put flycheck-ert-with-temp-buffer lisp-indent-function 0 put edebug-form-spec t] 5) #@159 Create a buffer from FILE-NAME and eval BODY. BODY is evaluated with `current-buffer' being a buffer with the contents FILE-NAME. (fn FILE-NAME &rest BODY) (defalias 'flycheck-ert-with-file-buffer '(macro . #[385 "\300\301DC\302\303\304\305\306\307BBBBBF\207" [let file-name (unless (file-exists-p file-name) (error "%s does not exist" file-name)) flycheck-ert-with-temp-buffer (insert-file-contents file-name 'visit) (set-visited-file-name file-name 'no-query) (cd (file-name-directory file-name)) (set-buffer-modified-p nil)] 11 (#$ . 2309)])) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put flycheck-ert-with-file-buffer lisp-indent-function 1 put edebug-form-spec t] 5) #@129 Execute BODY and kill the help buffer afterwards. Use this macro to test functions that create a Help buffer. (fn &rest BODY) (defalias 'flycheck-ert-with-help-buffer '(macro . #[128 "\300\301!\302BB\207" [unwind-protect macroexp-progn ((when (buffer-live-p (get-buffer (help-buffer))) (kill-buffer (help-buffer))))] 4 (#$ . 3013)])) (byte-code "\300\301\302\303#\300\207" [function-put flycheck-ert-with-help-buffer lisp-indent-function 0] 4) #@126 Execute BODY with Global Flycheck Mode enabled. After BODY, restore the old state of Global Flycheck Mode. (fn &rest BODY) (defalias 'flycheck-ert-with-global-mode '(macro . #[128 "\300\301\302\303\304BB\305BBE\207" [let ((old-state global-flycheck-mode)) unwind-protect progn (global-flycheck-mode 1) ((global-flycheck-mode (if old-state 1 -1)))] 7 (#$ . 3467)])) (byte-code "\300\301\302\303#\300\207" [function-put flycheck-ert-with-global-mode lisp-indent-function 0] 4) #@286 Add ENV to `process-environment' in BODY. Execute BODY with a `process-environment' which contains all variables from ENV added. ENV is an alist, where each cons cell `(VAR . VALUE)' is a environment variable VAR to be added to `process-environment' with VALUE. (fn ENV &rest BODY) (defalias 'flycheck-ert-with-env '(macro . #[385 "\300\301\302\303D\304BBBBB\207" [let ((process-environment (copy-sequence process-environment))) pcase-dolist `(,var \, value) ((setenv var value))] 7 (#$ . 3952)])) (byte-code "\300\301\302\303#\300\207" [function-put flycheck-ert-with-env lisp-indent-function 1] 4) #@152 Determine the absolute file name of a RESOURCE-FILE. Relative file names are expanded against `flycheck-ert--resource-directory'. (fn RESOURCE-FILE) (defalias 'flycheck-ert-resource-filename #[257 "\301\"\207" [flycheck-ert--resource-directory expand-file-name] 4 (#$ . 4564)]) #@186 Create a temp buffer from a RESOURCE-FILE and execute BODY. The absolute file name of RESOURCE-FILE is determined with `flycheck-ert-resource-filename'. (fn RESOURCE-FILE &rest BODY) (defalias 'flycheck-ert-with-resource-buffer '(macro . #[385 "\300\301DBB\207" [flycheck-ert-with-file-buffer flycheck-ert-resource-filename] 5 (#$ . 4853)])) (byte-code "\300\301\302\303#\300\207" [function-put flycheck-ert-with-resource-buffer lisp-indent-function 1] 4) #@165 Initialize a test suite with RESOURCE-DIR. RESOURCE-DIR is the directory, `flycheck-ert-resource-filename' should use to lookup resource files. (fn RESOURCE-DIR) (defalias 'flycheck-ert-initialize #[257 "\203\303\304!\210\305\306\211\"\211\204\303\307!\210 ?\205W\211\211\205U\211@\310!\n>\2041\311\312\313D\"\210\211\314H\310!\n>\204C\311\312\313D\"\210\211\314\315\316BBI\266A\266\202\202\262\207" [flycheck-ert--resource-directory flycheck-ert-ert-can-skip cl-struct-ert-test-tags error "Test suite already initialized" ert-select-tests t "No tests defined. Call `flycheck-ert-initialize' after defining all tests!" type-of signal wrong-type-argument ert-test 5 or ((satisfies ert-test-skipped-p))] 11 (#$ . 5320)]) #@963 Define a test case for a syntax CHECKER for LANGUAGE. CHECKER is a symbol or a list of symbols denoting syntax checkers being tested by the test. The test case is skipped, if any of these checkers cannot be used. LANGUAGE is a symbol or a list of symbols denoting the programming languages supported by the syntax checkers. This is currently only used for tagging the test appropriately. NAME is a symbol denoting the local name of the test. The test itself is ultimately named `flycheck-define-checker/CHECKER/NAME'. If CHECKER is a list, the first checker in the list is used for naming the test. Optionally, the keyword arguments `:tags' and `:expected-result' may be given. They have the same meaning as in `ert-deftest.', and are added to the tags and result expectations set up by this macro. The remaining forms KEYS-AND-BODY denote the body of the test case, including assertions and setup code. (fn CHECKER LANGUAGE NAME &rest KEYS-AND-BODY) (defalias 'flycheck-ert-def-checker-test '(macro . #[899 "\204\300\301!\210\204\300\302!\2109\203C\202\211@9\203'C\202(\303\304\"\303\305\"\2066\306\307\310\311#!\312!\211A@@\313\314\315\316\317\316\"\206U\320\321\322\323\322 #D\317\n\321\"E\322\303\324\" \"BBBBBBB\207" [error "No syntax checkers specified" "No languages specified" mapcar #[257 "\300\301\302\"!\207" [intern format "language-%s"] 5 "\n\n(fn L)"] #[257 "\300\301\302\"!\207" [intern format "checker-%s"] 5 "\n\n(fn C)"] default intern format "flycheck-define-checker/%s/%s" ert--parse-keys-and-body (syntax-checker external-tool) ert-deftest nil :expected-result plist-get :passed :tags append quote #[257 "\300\301\302\303\304D\305BBD\306\307\304DDDED\207" [skip-unless or not flycheck-checker-get quote ('command) executable-find flycheck-checker-executable] 8 "\n\n(fn C)"]] 27 (#$ . 6071)])) (byte-code "\300\301\302\303#\300\207" [function-put flycheck-ert-def-checker-test lisp-indent-function 3] 4) #@93 Whether RESULT denotes a timed-out test. RESULT is an ERT test result object. (fn RESULT) (defalias 'flycheck-ert-syntax-check-timed-out-p #[257 "\301!>\205\301!>\204\302\303\304D\"\210\211\305H@\306=\207" [cl-struct-ert-test-failed-tags type-of signal wrong-type-argument ert-test-failed 4 flycheck-ert-syntax-check-timed-out] 5 (#$ . 8060)]) #@46 Non-nil if the current checker has finished. (defvar flycheck-ert-syntax-checker-finished nil (#$ . 8421)) (byte-code "\300\301!\210\302\303\304\"\207" [make-variable-buffer-local flycheck-ert-syntax-checker-finished add-hook flycheck-after-syntax-check-hook #[0 "\301\211\207" [flycheck-ert-syntax-checker-finished t] 2]] 3) #@161 Time to wait until a checker is finished in seconds. After this time has elapsed, the checker is considered to have failed, and the test aborted with failure. (defconst flycheck-ert-checker-wait-time 10 (#$ . 8755)) (define-error 'flycheck-ert-syntax-check-timed-out "Syntax check timed out.") #@64 Wait until the syntax check in the current buffer is finished. (defalias 'flycheck-ert-wait-for-syntax-checker #[0 "\302 \204\302 Z W\203\303\304\305\"\210\202\302 Z W\204(\306 \210\307\310\304\"\210\210\304\211\207" [flycheck-ert-syntax-checker-finished flycheck-ert-checker-wait-time float-time accept-process-output nil 0.02 flycheck-stop signal flycheck-ert-syntax-check-timed-out] 4 (#$ . 9056)]) #@44 Like `flycheck-buffer', but synchronously. (defalias 'flycheck-ert-buffer-sync #[0 "\303\304C\3051\306\307 )C0\202\310\240\210\211@AD\262\311C\303C\312\313%\216\314\242\"\240)\2049\315\242!\210\266\316 \210\317C\3201I\3030\202T\310\240\210\211@AD\262\321C\303C\312\322%\216\314\242\"\240)\204p\315\242!\210\266\323 \210\324\325!C\303C\312\326#\216\n\206\207\240)\204\221\315\242!\210\266\327C\3301\236\3030\202\251\310\240\210\211@AD\262\331C\303C\312\332%\216\314\242\"\240)\203\305\315\242!\210\266\333 \207" [flycheck-ert-syntax-checker-finished signal-hook-function flycheck-current-syntax-check nil not (error) ert--should-signal-hook flycheck-running-p signal #1=#:ert-form-evaluation-aborted-166 make-closure #[0 "\303\304C\305\300\242\301BD\244\302\242\306=?\205\307\302\242D\244\302\242\306=?\205.\310\311N\211\205,\312\313\301\"D\262\244\240\210\314\303\242!\207" [V0 V1 V2 V3 (should (not (flycheck-running-p))) :form #1# :value not ert-explainer :explanation apply ert--signal-should-execution] 7] apply ert-fail flycheck-mode flycheck-get-checker-for-buffer (error) #2=#:ert-form-evaluation-aborted-171 #[0 "\303\304C\305\300\242\301BD\244\302\242\306=?\205\307\302\242D\244\302\242\306=?\205.\310\311N\211\205,\312\313\301\"D\262\244\240\210\314\303\242!\207" [V0 V1 V2 V3 (should (flycheck-get-checker-for-buffer)) :form #2# :value flycheck-get-checker-for-buffer ert-explainer :explanation apply ert--signal-should-execution] 7] flycheck-buffer gensym "ert-form-evaluation-aborted-" #[0 "\301\302\303\304\305\300\242\257\240\210\306\301\242!\207" [V0 V1 (should #3=(or flycheck-current-syntax-check flycheck-ert-syntax-checker-finished)) :form #3# :value ert--signal-should-execution] 6] flycheck-deferred-check-p (error) #4=#:ert-form-evaluation-aborted-178 #[0 "\303\304C\305\300\242\301BD\244\302\242\306=?\205\307\302\242D\244\302\242\306=?\205.\310\311N\211\205,\312\313\301\"D\262\244\240\210\314\303\242!\207" [V0 V1 V2 V3 (should-not (flycheck-deferred-check-p)) :form #4# :value flycheck-deferred-check-p ert-explainer :explanation apply ert--signal-should-execution] 7] flycheck-ert-wait-for-syntax-checker] 10 (#$ . 9475)]) #@92 Clear the current buffer. Raise an assertion error if the buffer is not clear afterwards. (defalias 'flycheck-ert-ensure-clear #[0 "\302 \210\303C\3041\305 )C0\202\306\240\210\211@AD\262\307C\310C\311\312%\216\313\242\"\240)\2049\314\242!\210\266\303C\3151P\305\316\317\320ed\"\")C0\202[\306\240\210\211@AD\262\321C\310C\311\322%\216\313\242\"\240)\204w\314\242!\210\210\211\242\207" [signal-hook-function flycheck-current-errors flycheck-clear not (error) ert--should-signal-hook signal #1=#:ert-form-evaluation-aborted-183 nil make-closure #[0 "\303\304C\305\300\242\301BD\244\302\242\306=?\205\307\302\242D\244\302\242\306=?\205.\310\311N\211\205,\312\313\301\"D\262\244\240\210\314\303\242!\207" [V0 V1 V2 V3 (should (not flycheck-current-errors)) :form #1# :value not ert-explainer :explanation apply ert--signal-should-execution] 7] apply ert-fail (error) -any\? #[257 "\300\301\"\207" [overlay-get flycheck-overlay] 4 "\n\n(fn OV)"] overlays-in #2=#:ert-form-evaluation-aborted-188 #[0 "\303\304C\305\300\242\301BD\244\302\242\306=?\205\307\302\242D\244\302\242\306=?\205.\310\311N\211\205,\312\313\301\"D\262\244\240\210\314\303\242!\207" [V0 V1 V2 V3 (should (not (-any\? (lambda (ov) (overlay-get ov 'flycheck-overlay)) (overlays-in (point-min) (point-max))))) :form #2# :value not ert-explainer :explanation apply ert--signal-should-execution] 7]] 10 (#$ . 11708)]) #@67 Return a copy ERR with the `group' property set to nil. (fn ERR) (defalias 'flycheck-error-without-group #[257 "\301!\302!>\204\303\304\305D\"\210\211\211\306\307I\266\207" [cl-struct-flycheck-error-tags copy-flycheck-error type-of signal wrong-type-argument flycheck-error 9 nil] 6 (#$ . 13138)]) #@108 Test that ERROR has a proper overlay in the current buffer. ERROR is a Flycheck error object. (fn ERROR) (defalias 'flycheck-ert-should-overlay #[257 "\302\303\304\"\305\306\307 T\"\"\310!\203e\212eb\210\311 )B\202\"\312\313\"\314!>\2041\315\316\317D\"\210\320H\321!\211\322N\323!\324!\325E\326\327!C\330C\303\331#\216\n\240)\204]\332\242!\210\266\333C\3341p\335)\336D0\202{\315\240\210\211@AD\262\337C\330C\303\340%\216\341\242\"\240)\204\227\332\242!\210\266\342C\3431\256\335\344 !@)D0\202\271\315\240\210\211@AD\262\345C\330C\303\346%\216\341\242\"\240)\204\325\332\242!\210\266\342C\3471\354\335\350 !A)D0\202\367\315\240\210\211@AD\262\351C\330C\303\352%\216\341\242\"\240)\204\332\242!\210\266\353C\3541)\335\333 \322\")D0\2024\315\240\210\211@AD\262\355C\330C\303\356%\216\341\242\"\240)\204P\332\242!\210\266\357C\3601j\335\361\306\362\333\f\363\"#)D0\202u\315\240\210\211@AD\262\364C\330C\303\365%\216\341\242\"\240)\204\221\332\242!\210\266\353C\3661\250\335\333 \367\")D0\202\263\315\240\210\211@AD\262\370C\330C\303\371%\216\341\242\"\240)\204\317\332\242!\210\266\357C\3721\352\335\373\333\n\317\"!\373 !)D0\202\365\315\240\210\211@AD\262\374C\330C\303\375%\216\341\242\"\240)\204\332\242!\210\210\211\242\207" [cl-struct-flycheck-error-tags signal-hook-function -first make-closure #[257 "\301\302\303\"!\301\300!\232\207" [V0 flycheck-error-without-group overlay-get flycheck-error] 5 "\n\n(fn OV)"] flycheck-overlays-in 0 buffer-size flycheck-relevant-error-other-file-p point-at-eol flycheck-error-region-for-mode symbols type-of signal wrong-type-argument flycheck-error 7 flycheck-error-level-overlay-category face flycheck-error-level-fringe-bitmap flycheck-error-level-fringe-face left-fringe gensym "ert-form-evaluation-aborted-" nil #[0 "\301\302\303\304\305\300\242\257\240\210\306\301\242!\207" [V0 V1 (should overlay) :form overlay :value ert--signal-should-execution] 6] ert-fail overlay-get (error) ert--should-signal-hook flycheck-overlay #1=#:ert-form-evaluation-aborted-195 #[0 "\303\304C\305\300\242\301BD\244\302\242\306=?\205\307\302\242D\244\302\242\306=?\205.\310\311N\211\205,\312\313\301\"D\262\244\240\210\314\303\242!\207" [V0 V1 V2 V3 (should (overlay-get overlay 'flycheck-overlay)) :form #1# :value overlay-get ert-explainer :explanation apply ert--signal-should-execution] 7] apply = (error) overlay-start #2=#:ert-form-evaluation-aborted-200 #[0 "\303\304C\305\300\242\301BD\244\302\242\306=?\205\307\302\242D\244\302\242\306=?\205.\310\311N\211\205,\312\313\301\"D\262\244\240\210\314\303\242!\207" [V0 V1 V2 V3 (should (= (overlay-start overlay) (car region))) :form #2# :value = ert-explainer :explanation apply ert--signal-should-execution] 7] (error) overlay-end #3=#:ert-form-evaluation-aborted-205 #[0 "\303\304C\305\300\242\301BD\244\302\242\306=?\205\307\302\242D\244\302\242\306=?\205.\310\311N\211\205,\312\313\301\"D\262\244\240\210\314\303\242!\207" [V0 V1 V2 V3 (should (= (overlay-end overlay) (cdr region))) :form #3# :value = ert-explainer :explanation apply ert--signal-should-execution] 7] eq (error) #4=#:ert-form-evaluation-aborted-210 #[0 "\303\304C\305\300\242\301BD\244\302\242\306=?\205\307\302\242D\244\302\242\306=?\205.\310\311N\211\205,\312\313\301\"D\262\244\240\210\314\303\242!\207" [V0 V1 V2 V3 (should (eq (overlay-get overlay 'face) face)) :form #4# :value eq ert-explainer :explanation apply ert--signal-should-execution] 7] equal (error) get-char-property display before-string #5=#:ert-form-evaluation-aborted-215 #[0 "\303\304C\305\300\242\301BD\244\302\242\306=?\205\307\302\242D\244\302\242\306=?\205.\310\311N\211\205,\312\313\301\"D\262\244\240\210\314\303\242!\207" [V0 V1 V2 V3 (should (equal (get-char-property 0 'display (overlay-get overlay 'before-string)) fringe-icon)) :form #5# :value equal ert-explainer :explanation apply ert--signal-should-execution] 7] (error) category #6=#:ert-form-evaluation-aborted-220 #[0 "\303\304C\305\300\242\301BD\244\302\242\306=?\205\307\302\242D\244\302\242\306=?\205.\310\311N\211\205,\312\313\301\"D\262\244\240\210\314\303\242!\207" [V0 V1 V2 V3 (should (eq (overlay-get overlay 'category) category)) :form #6# :value eq ert-explainer :explanation apply ert--signal-should-execution] 7] (error) flycheck-error-without-group #7=#:ert-form-evaluation-aborted-225 #[0 "\303\304C\305\300\242\301BD\244\302\242\306=?\205\307\302\242D\244\302\242\306=?\205.\310\311N\211\205,\312\313\301\"D\262\244\240\210\314\303\242!\207" [V0 V1 V2 V3 (should (equal (flycheck-error-without-group (overlay-get overlay 'flycheck-error)) (flycheck-error-without-group error))) :form #7# :value equal ert-explainer :explanation apply ert--signal-should-execution] 7]] 19 (#$ . 13451)]) #@49 Sort ERRORS by `flycheck-error-<'. (fn ERRORS) (defalias 'flycheck-ert-sort-errors #[257 "\300\301\"\207" [seq-sort flycheck-error-<] 4 (#$ . 18353)]) #@539 Test that the current buffers has ERRORS. ERRORS is a list of errors expected to be present in the current buffer. Each error is given as a list of arguments to `flycheck-error-new-at'. If ERRORS are omitted, test that there are no errors at all in the current buffer. With ERRORS, test that each error in ERRORS is present in the current buffer, and that the number of errors in the current buffer is equal to the number of given ERRORS. In other words, check that the buffer has all ERRORS, and no other errors. (fn &rest ERRORS) (defalias 'flycheck-ert-should-errors #[128 "\302\303\304\305\306\"\"!\302!\307C\3101\"\311\303\312\"\303\312\")D0\202-\313\240\210\211@AD\262\314C\315C\316\317%\216\305\242\"\240)\204I\320\242!\210\266\321\316\322\"#\210\323\324\"\266\325C\3261o\311G\327ed\"G)D0\202z\313\240\210\211@AD\262\330C\315C\316\331%\216\305\242\"\240)\204\226\320\242!\210\210\211\242\207" [flycheck-current-errors signal-hook-function flycheck-ert-sort-errors mapcar apply-partially apply flycheck-error-new-at equal (error) ert--should-signal-hook flycheck-error-without-group signal #1=#:ert-form-evaluation-aborted-230 nil make-closure #[0 "\303\304C\305\300\242\301BD\244\302\242\306=?\205\307\302\242D\244\302\242\306=?\205.\310\311N\211\205,\312\313\301\"D\262\244\240\210\314\303\242!\207" [V0 V1 V2 V3 (should (equal (mapcar #'flycheck-error-without-group expected) (mapcar #'flycheck-error-without-group current))) :form #1# :value equal ert-explainer :explanation apply ert--signal-should-execution] 7] ert-fail cl-mapcar #[514 "\302C\3031!\304\305\306\307\310\300\"\"!\305\306\307\310!\"!)D0\202,\311\240\210\211@AD\262\312C\313C\314\315%\216\316\242\"\240)\204H\317\242!\210\210\211\242\207" [V0 signal-hook-function equal (error) ert--should-signal-hook flycheck-ert-sort-errors mapcar flycheck-error-without-group flycheck-related-errors signal #2=#:ert-form-evaluation-aborted-235 nil make-closure #[0 "\303\304C\305\300\242\301BD\244\302\242\306=?\205\307\302\242D\244\302\242\306=?\205.\310\311N\211\205,\312\313\301\"D\262\244\240\210\314\303\242!\207" [V0 V1 V2 V3 (should (equal (flycheck-ert-sort-errors (mapcar #'flycheck-error-without-group (flycheck-related-errors err1 expected))) (flycheck-ert-sort-errors (mapcar #'flycheck-error-without-group (flycheck-related-errors err2))))) :form #2# :value equal ert-explainer :explanation apply ert--signal-should-execution] 7] apply ert-fail] 12 "\n\n(fn ERR1 ERR2)"] mapc flycheck-ert-should-overlay = (error) flycheck-overlays-in #3=#:ert-form-evaluation-aborted-240 #[0 "\303\304C\305\300\242\301BD\244\302\242\306=?\205\307\302\242D\244\302\242\306=?\205.\310\311N\211\205,\312\313\301\"D\262\244\240\210\314\303\242!\207" [V0 V1 V2 V3 (should (= (length errors) (length (flycheck-overlays-in (point-min) (point-max))))) :form #3# :value = ert-explainer :explanation apply ert--signal-should-execution] 7]] 13 (#$ . 18513)]) (define-error 'flycheck-ert-suspicious-checker "Suspicious state from checker") #@174 Test a syntax check in BUFFER, expecting ERRORS. This is like `flycheck-ert-should-syntax-check', but with a buffer in the right mode instead of a file. (fn &rest ERRORS) (defalias 'flycheck-ert-should-syntax-check-in-buffer #[128 "\303\304\305 \210*\306C\304C\307\310\311\312\"\304\313$\210\307\314\311\315\"\304\313$\210\316 \210\211\242\203-\317\320\304\"\210\321\322\"\210\323C\3241D\325\242G)D0\202O\317\240\210\211@AD\262\326C\304C\311\327%\216\321\242\"\240)\204k\330\242!\210\266\331 \207" [hack-local-variables-hook enable-local-variables signal-hook-function :safe nil hack-local-variables 0 add-hook flycheck-process-error-functions make-closure #[257 "\300\211\242T\240\210\301\207" [V0 nil] 3 "\n\n(fn ERR)"] :local flycheck-status-changed-functions #[257 "\211\301=\205 \300\302\240\207" [V0 suspicious t] 3 "\n\n(fn STATUS)"] flycheck-ert-buffer-sync signal flycheck-ert-suspicious-checker apply flycheck-ert-should-errors = (error) ert--should-signal-hook #1=#:ert-form-evaluation-aborted-245 #[0 "\303\304C\305\300\242\301BD\244\302\242\306=?\205\307\302\242D\244\302\242\306=?\205.\310\311N\211\205,\312\313\301\"D\262\244\240\210\314\303\242!\207" [V0 V1 V2 V3 (should (= process-hook-called (length errors))) :form #1# :value = ert-explainer :explanation apply ert--signal-should-execution] 7] ert-fail flycheck-ert-ensure-clear] 13 (#$ . 21592)]) #@991 Test a syntax check in RESOURCE-FILE with MODES. RESOURCE-FILE is the file to check. MODES is a single major mode symbol or a list thereof, specifying the major modes to syntax check with. If more than one major mode is specified, the test is run for each mode separately, so if you give three major modes, the entire test will run three times. ERRORS is the list of expected errors, as in `flycheck-ert-should-errors'. If omitted, the syntax check must not emit any errors. The errors are cleared after each test. The syntax checker is selected via standard syntax checker selection. To test a specific checker, you need to set `flycheck-checker' or `flycheck-disabled-checkers' accordingly before using this predicate, depending on whether you want to use manual or automatic checker selection. During the syntax check, configuration files of syntax checkers are also searched in the `config-files' sub-directory of the resource directory. (fn RESOURCE-FILE MODES &rest ERRORS) (defalias 'flycheck-ert-should-syntax-check #[642 "9\203 C\262\211\205a\211@\300!\204\301\302\303\"!\210\304!\305!\204+\306\307\"\210\310\311\312\"r\211q\210\313\314\"\216\315\216\316\317\"\210\320\321\"\210\322\323!!\210\324\325!\210 \210\326\327\"\210+\266A\266\202\202\n\207" [fboundp ert-skip format "%S missing" flycheck-ert-resource-filename file-exists-p error "%s does not exist" generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] #[0 "\300\301!\210\302\301\303\"\207" [set-buffer-modified-p nil set-visited-file-name no-query] 3] insert-file-contents visit set-visited-file-name no-query cd file-name-directory set-buffer-modified-p nil apply flycheck-ert-should-syntax-check-in-buffer] 10 (#$ . 23000)]) #@169 Determine whether point is at the N'th Flycheck error. Return non-nil if the point is at the N'th Flycheck error in the current buffer. Otherwise return nil. (fn N) (defalias 'flycheck-ert-at-nth-error #[257 "\211S8 \302\"\303`!\235\205`@U\207" [flycheck-current-errors flycheck-highlighting-mode flycheck-error-region-for-mode flycheck-overlay-errors-at] 7 (#$ . 24796)]) #@55 Explain a failed at-nth-error predicate at N. (fn N) (defalias 'flycheck-ert-explain--at-nth-error #[257 "\302`!\211\204 \303\304`#\207\305@\"\303\306\307S8 \"@`T%\207" [flycheck-current-errors flycheck-highlighting-mode flycheck-overlay-errors-at format "Expected to be at error %s, but no error at point %s" cl-position "Expected to be at point %s and error %s, but point %s is at error %s" flycheck-error-region-for-mode] 9 (#$ . 25185)]) (byte-code "\300\301\302\303#\210\304\305!\207" [put flycheck-ert-at-nth-error ert-explainer flycheck-ert-explain--at-nth-error provide flycheck-ert] 4)