;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\210\304\305\306\307\310DD\311\312\313\314\315&\207" [require rx lsp-dart-protocol lsp-dart-utils custom-declare-variable lsp-dart-test-pop-to-buffer-on-run funcall function #[0 "\300\207" [display-only] 1] "Controls whether to pop to the tests buffer on run.\n\nWhen set to nil the buffer will only be created, and not displayed.\nWhen set to `display-only' the buffer will be displayed, but it will\nnot become focused, otherwise the buffer is displayed and focused." :group lsp-dart :type (choice (const :tag "Create the buffer, but don't display it" nil) (const :tag "Create and display the buffer, but don't focus it" display-only) (const :tag "Create, display, and focus the buffer" t))] 8) (defconst lsp-dart-test-output--passed-icon "★") (defconst lsp-dart-test-output--success-icon "✔") (defconst lsp-dart-test-output--skipped-icon "•") (defconst lsp-dart-test-output--hidden-icon "○") (defconst lsp-dart-test-output--error-icon "✖") (defvar lsp-dart-test-output--tests-count 0) (defvar lsp-dart-test-output--tests-passed 0) (defvar lsp-dart-test-output--first-log t) (defconst lsp-dart-test-output--buffer-name "*LSP Dart tests*") (defconst lsp-dart-test-output--exception-re ".*\\(?:EXCEPTION\\|exception\\).*\\|\\|#.+") (defconst lsp-dart-test-output--expected-actual-re "[[:blank:]]*Expected:.*\\|[[:blank:]]*Actual:.*") (defconst lsp-dart-test--font-lock (byte-code "\302B \303BD\207" [lsp-dart-test-output--exception-re lsp-dart-test-output--expected-actual-re 'error 'warning] 3)) (defvar lsp-dart-test--output-font-lock '((lsp-dart-test--font-lock))) #@58 Return the icon for test done notification. (fn INPUT0) (defalias 'lsp-dart-test-output--get-icon #[257 "\304\305\"\304\306\"\304\307\"\211\203\207\310\230\203\203 \207\310\230\203*\204*\n\207 \207" [lsp-dart-test-output--hidden-icon lsp-dart-test-output--skipped-icon lsp-dart-test-output--success-icon lsp-dart-test-output--error-icon gethash "result" "skipped" "hidden" "success"] 6 (#$ . 1739)]) #@58 Return the icon for test done notification. (fn INPUT0) (defalias 'lsp-dart-test-output--get-face #[257 "\300\301\"\300\302\"\300\303\"\211\203\304\207\305\230\203\203\306\207\305\230\203*\204*\307\207\310\207" [gethash "result" "skipped" "hidden" font-lock-comment-face "success" homoglyph success error] 6 (#$ . 2162)]) #@65 Send MESSAGE with ARGS to test buffer. (fn MESSAGE &rest ARGS) (defalias 'lsp-dart-test-output--send #[385 "\301r\302 q\210\212db\210\303\304\305P#c+\207" [inhibit-read-only t lsp-dart-test-output--get-buffer-create apply format "\n"] 6 (#$ . 2506)]) #@35 Create a buffer for test display. (defalias 'lsp-dart-test-output--get-buffer-create #[0 "\302!r\211q\210\303\301!\210\304 \206 \305\306!\204\306 \210p)\207" [lsp-dart-test-output--buffer-name default-directory get-buffer-create make-local-variable lsp-dart-get-project-root derived-mode-p lsp-dart-test-output-content-mode] 3 (#$ . 2767)]) #@19 Show test buffer. (defalias 'lsp-dart-test-output--show-buffer #[0 "\302 \303r\211q\210\303\304 \210* \305=\203 p\306!\210\211q\262\202' \205'\307!)\207" [inhibit-read-only lsp-dart-test-pop-to-buffer-on-run lsp-dart-test-output--get-buffer-create t erase-buffer display-only display-buffer pop-to-buffer] 4 (#$ . 3120)]) #@26 Handle test run started. (defalias 'lsp-dart-test-output--handle-run-started #[0 "\301\302 \210\303\304!\207" [lsp-dart-test-output--first-log t lsp-dart-test-output--show-buffer lsp-dart-test-output--send "Running tests...\n"] 2 (#$ . 3456)]) #@51 Handle all start notification. (fn NOTIFICATION) (defalias 'lsp-dart-test-output--handle-all-start #[257 "\302\211\211\207" [lsp-dart-test-output--tests-count lsp-dart-test-output--tests-passed 0] 4 (#$ . 3707)]) #@15 (fn INPUT0) (defalias 'lsp-dart-test-output--handle-start #[257 "\301\302\301\303\"\"\304!?\205T\211\207" [lsp-dart-test-output--tests-count gethash "groupIDs" "test" seq-empty-p] 6 (#$ . 3929)]) #@59 Handle test done notification. (fn INPUT0 INPUT1 INPUT2) (defalias 'lsp-dart-test-output--handle-done #[771 "\303\304\"\303\305\"\303\306\"\203 r\307 q\210\310\311 \210*\312\313\314!\315Q\316\317 !#\2037\320\321\"\207\322\230\203@\nT\313\323\324Z\"\316\325#\320\326#\207" [lsp-dart-test-output--first-log inhibit-read-only lsp-dart-test-output--tests-passed gethash "result" "time" "hidden" lsp-dart-test-output--get-buffer-create t erase-buffer nil propertize lsp-dart-test-output--get-icon " " font-lock-face lsp-dart-test-output--get-face lsp-dart-test-output--send "%s" "success" format "(%s ms)" font-lock-comment-face "%s %s"] 15 (#$ . 4139)]) #@50 Handle all tests done notification. (fn INPUT0) (defalias 'lsp-dart-test-output--handle-all-done #[257 "\304\305\"\211\203\306\307\310\311\211#\312\313#!\207\306\307\310\314 \n#\312 #!\207" [lsp-dart-test-output--passed-icon lsp-dart-test-output--tests-passed lsp-dart-test-output--tests-count font-lock-warning-face gethash "success" lsp-dart-test-output--send propertize format "\n%s All ran tests passed %s" font-lock-face success "\n● %s/%s tests passed"] 8 (#$ . 4821)]) #@46 Handle test print notification. (fn INPUT0) (defalias 'lsp-dart-test-output--handle-print #[257 "\300\301\"\302\303\"\207" [gethash "message" lsp-dart-test-output--send "%s"] 5 (#$ . 5310)]) #@46 Handle test error notification. (fn INPUT0) (defalias 'lsp-dart-test-output--handle-error #[257 "\300\301\"\300\302\"\303\304\"\210\303\304\"\207" [gethash "error" "stackTrace" lsp-dart-test-output--send "%s"] 6 (#$ . 5510)]) (defvar lsp-dart-test-output-content-mode-hook nil) (byte-code "\300\301N\204\f\302\300\301\303#\210\304\305!\204\302\305\306\307#\210\300\207" [lsp-dart-test-output-content-mode-hook variable-documentation put "Hook run after entering lsp-dart-test-output--buffer-name mode.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" boundp lsp-dart-test-output-content-mode-map definition-name lsp-dart-test-output-content-mode] 4) (defvar lsp-dart-test-output-content-mode-map (make-sparse-keymap)) (byte-code "\301\302N\204\303\301\302\304\305!#\210\306\307!\204\303\307\310\311#\210\312\313 !\210\307\302N\204-\303\307\302\304\314!#\210\306\300!\204B\303\300\310\311#\210\315\316\300\317\"\210!\210\300\302N\204P\303\300\302\304\320!#\210\303\311\321\322#\207" [lsp-dart-test-output-content-mode-abbrev-table lsp-dart-test-output-content-mode-map variable-documentation put purecopy "Keymap for `lsp-dart-test-output-content-mode'." boundp lsp-dart-test-output-content-mode-syntax-table definition-name lsp-dart-test-output-content-mode (lambda (#1=#:def-tmp-var) (defvar lsp-dart-test-output-content-mode-syntax-table #1#)) make-syntax-table "Syntax table for `lsp-dart-test-output-content-mode'." (lambda (#1#) (defvar lsp-dart-test-output-content-mode-abbrev-table #1#)) define-abbrev-table nil "Abbrev table for `lsp-dart-test-output-content-mode'." derived-mode-parent special-mode] 5) #@275 Major mode for buffer running tests. In addition to any hooks its parent mode `special-mode' might have run, this mode runs the hook `lsp-dart-test-output-content-mode-hook', as the final or penultimate step during initialization. \{lsp-dart-test-output-content-mode-map} (defalias 'lsp-dart-test-output-content-mode #[0 "\306\300!\210\307\310 \210\311\n\310\312N\203\313\311\312\310\312N#\210\314\f!\204'\315\f\316 \"\210\317 !\211\2035\211\320 =\203;\321 \322 \"\210\210\323\324\"\204U=\204U\325\324C#\210\326\f!\210\327 !\210)\330\331!\207" [delay-mode-hooks major-mode lsp-dart-test-output--buffer-name mode-name lsp-dart-test-output-content-mode-map lsp-dart-test-output-content-mode-syntax-table make-local-variable t special-mode lsp-dart-test-output-content-mode mode-class put keymap-parent set-keymap-parent current-local-map char-table-parent standard-syntax-table set-char-table-parent syntax-table abbrev-table-get :parents abbrev-table-put use-local-map set-syntax-table run-mode-hooks lsp-dart-test-output-content-mode-hook lsp-dart-test-output-content-mode-abbrev-table local-abbrev-table lsp-dart-test--output-font-lock font-lock-defaults] 5 (#$ . 7224) nil]) (byte-code "\300\301\302\"\210\300\303\304\"\210\300\305\306\"\210\300\307\310\"\210\300\311\312\"\210\300\313\314\"\210\300\315\316\"\210\317\320!\207" [add-hook lsp-dart-test-run-started-hook lsp-dart-test-output--handle-run-started lsp-dart-test-all-start-notification-hook lsp-dart-test-output--handle-all-start lsp-dart-test-start-notification-hook lsp-dart-test-output--handle-start lsp-dart-test-done-notification-hook lsp-dart-test-output--handle-done lsp-dart-test-all-done-notification-hook lsp-dart-test-output--handle-all-done lsp-dart-test-print-notification-hook lsp-dart-test-output--handle-print lsp-dart-test-error-notification-hook lsp-dart-test-output--handle-error provide lsp-dart-test-output] 3)