%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/share/emacs/27.2/lisp/emacs-lisp/
Upload File :
Create Path :
Current File : //usr/local/share/emacs/27.2/lisp/emacs-lisp/ert-x.elc

;ELC
;;; Compiled
;;; in Emacs version 27.2
;;; 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.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(require 'ert)
#@124 Return a string containing STRING as a text button with PROPERTIES.

See `make-text-button'.

(fn STRING &rest PROPERTIES)
(defalias 'ert--text-button #[385 "\300\301!r\211q\210\302\303\304\305\306!\307\"\310$\216c\210\311\312ed$\210\313 *\207" [generate-new-buffer " *temp*" make-byte-code 0 "\301\300!\205	\302\300!\207" vconcat vector [buffer-name kill-buffer] 2 apply make-text-button buffer-string] 9 (#$ . 424)])
#@106 Compute a test buffer name based on BASE-NAME.

Helper function for `ert--test-buffers'.

(fn BASE-NAME)
(defalias 'ert--format-test-buffer-name #[257 "\301\302\303 \203 \303 \304!>\204\305\306\307D\"\210\211\310H\262\206!\311\203,\301\312\"\202-\313#\207" [cl-struct-ert-test-tags format "*Test buffer (%s)%s*" ert-running-test type-of signal wrong-type-argument ert-test 1 "<anonymous test>" ": %s" ""] 8 (#$ . 854)])
#@233 Table of all test buffers.  Keys are the buffer objects, values are t.

The main use of this table is for `ert-kill-all-test-buffers'.
Not all buffers in this table are necessarily live, but all live
test buffers are in this table.
(defvar ert--test-buffers (make-hash-table :weakness t) (#$ . 1293))
(define-button-type 'ert--test-buffer-button 'action 'ert--test-buffer-button-action 'help-echo "mouse-2, RET: Pop to test buffer")
#@69 Pop to the test buffer that BUTTON is associated with.

(fn BUTTON)
(defalias 'ert--test-buffer-button-action #[257 "\300\301\302\"!\207" [pop-to-buffer button-get ert--test-buffer] 5 (#$ . 1732)])
#@183 Helper function for `ert-with-test-buffer'.

Create a test buffer with a name based on ERT--BASE-NAME and run
ERT--THUNK with that buffer as current.

(fn ERT--BASE-NAME ERT--THUNK)
(defalias 'ert--call-with-test-buffer #[514 "\302\303!!\304\305!\306\307\310%\311\312#\210rq\210\313B	B *\314!\210\315\"\210\207" [ert--test-buffers ert--infos generate-new-buffer ert--format-test-buffer-name ert--text-button buffer-name :type ert--test-buffer-button ert--test-buffer puthash t "Buffer: " kill-buffer remhash] 9 (#$ . 1938)])
#@346 Create a test buffer and run BODY in that buffer.

To be used in ERT tests.  If BODY finishes successfully, the test
buffer is killed; if there is an error, the test buffer is kept
around on error for further inspection.  Its name is derived from
the name of the test and the result of NAME-FORM.

(fn (&key ((:name NAME-FORM) nil)) &body BODY)
(defalias 'ert-with-test-buffer '(macro . #[128 "\211\203
\211A\262\242\202\300\301\302GD\"\303\304\"A@\211\203E\211@\305>\203.\211AA\262\202\306>A@\203<\307\262\202\310\311@\"\210\202\210\312\313\307BBE\207" [signal wrong-number-of-arguments ert-with-test-buffer plist-member :name (:name :allow-other-keys) :allow-other-keys nil error "Keyword argument %s not one of (:name)" ert--call-with-test-buffer lambda] 8 (#$ . 2482)]))
(byte-code "\300\301\302\303#\210\304\301\305\306#\300\301\305\306#\207" [put ert-with-test-buffer edebug-form-spec ((":name" form) body) function-put lisp-indent-function 1] 5)
#@44 Kill all test buffers that are still live.
(defalias 'ert-kill-all-test-buffers #[0 "\301C\302\303\304\305\306\307!\310\"\311\312%\"\210\313\314\242\315!#\266\316!\210\317\207" [ert--test-buffers 0 maphash make-byte-code 514 "\301!\203\f\302!\205\300\211\242T\240\207" vconcat vector [buffer-live-p kill-buffer] 4 "\n\n(fn BUFFER DUMMY)" message "%s out of %s test buffers killed" hash-table-count clrhash nil] 8 (#$ . 3465) nil])
#@543 Simulate calling COMMAND the way the Emacs command loop would call it.

This effectively executes

  (apply (car COMMAND) (cdr COMMAND))

and returns the same value, but additionally runs hooks like
`pre-command-hook' and `post-command-hook', and sets variables
like `this-command' and `last-command'.

COMMAND should be a list where the car is the command symbol and
the rest are arguments to the command.

NOTE: Since the command is not called by `call-interactively'
test for `called-interactively' in the command will fail.

(fn COMMAND)
(defalias 'ert-simulate-command #[257 "\211<\204
\306\307\310C\310$\210\311@!\204\306\312\310@C\310$\210\203)\306\313\310C\310$\210\310\211@\314\n!\2066\n\315\316!\210\317@A\"\262\315\320!\210\321\304!\203U\f\203U\315\322!\210@\321\323!\203d
	\203p\203p\301 \210\203|\306\324\310C\310$\210\211\207" [unread-command-events deactivate-mark this-original-command this-command deferred-action-list real-last-command cl--assertion-failed (listp command) nil commandp (commandp (car command)) (not unread-command-events) command-remapping run-hooks pre-command-hook apply post-command-hook boundp deferred-action-function last-repeatable-command (not unread-command-events) last-command transient-mark-mode] 7 (#$ . 3915)])
#@47 Run all idle timers (from `timer-idle-list').
(defalias 'ert-run-idle-timers #[0 "\301!\211\205\211@\302!\210A\266\202\202\207" [timer-idle-list copy-sequence timer-event-handler] 4 (#$ . 5215)])
#@289 Return a copy of S with all matches of REGEXPS removed.

Elements of REGEXPS may also be two-element lists (REGEXP
SUBEXP), where SUBEXP is the number of a subexpression in
REGEXP.  In that case, only that subexpression will be removed
rather than the entire match.

(fn S &rest REGEXPS)
(defalias 'ert-filter-string #[385 "\300\301!r\211q\210\302\303\304\305\306!\307\"\310$\216c\210\211\203a\211@\211<\203&\211\202)\211\311B\211G\310U\2039\211A\262\242\202@\312\313\314GD\"@eb\210\315\316\317#\203X\320\321\317\211\316%\210\202E\266A\266\202\202\210\322 *\207" [generate-new-buffer " *temp*" make-byte-code 0 "\301\300!\205	\302\300!\207" vconcat vector [buffer-name kill-buffer] 2 (nil) signal wrong-number-of-arguments (regexp subexp) re-search-forward nil t replace-match "" buffer-string] 14 (#$ . 5425)])
#@643 Return a string with properties as specified by ARGS.

ARGS is a list of strings and plists.  The strings in ARGS are
concatenated to produce an output string.  In the output string,
each string from ARGS will be have the preceding plist as its
property list, or no properties if there is no plist before it.

As a simple example,

(ert-propertized-string "foo " \='(face italic) "bar" " baz" nil " quux")

would return the string "foo bar baz quux" where the substring
"bar baz" has a `face' property with the value `italic'.

None of the ARGS are modified, but the return value may share
structure with the plists in ARGS.

(fn &rest ARGS)
(defalias 'ert-propertized-string #[128 "\300\301!r\211q\210\302\303\304\305\306!\307\"\310$\216\311\311:\203Z@\262\211;\2033`c\210\312`#\266\202S\211<\203M\313G\310\"\303U\204G\314\315\"\210\211\262\202S\314\316\317#\210A\262\202\266\320 *\207" [generate-new-buffer " *temp*" make-byte-code 0 "\301\300!\205	\302\300!\207" vconcat vector [buffer-name kill-buffer] 2 nil set-text-properties mod error "Odd number of args in plist: %S" "cl-etypecase failed: %s, %s" (string list) buffer-string] 10 (#$ . 6265)])
#@394 Protect the buffer named BUFFER-NAME from side-effects and run THUNK.

Renames the buffer BUFFER-NAME to a new temporary name, creates a
new buffer named BUFFER-NAME, executes THUNK, kills the new
buffer, and renames the original buffer back to BUFFER-NAME.

This is useful if THUNK has undesirable side-effects on an Emacs
buffer with a fixed name such as *Messages*.

(fn BUFFER-NAME THUNK)
(defalias 'ert-call-with-buffer-renamed #[514 "\300\301\302\"!r\303!q\210\304!\210)\305\306\307\310\311\"\312\"\313$\216\303!\210 )\207" [generate-new-buffer-name format "%s orig buffer" get-buffer-create rename-buffer make-byte-code 0 "\302\300!\203\n\303\300!\210r\301q\210\304\300!)\207" vconcat vector [get-buffer kill-buffer rename-buffer] 2] 10 (#$ . 7451)])
#@155 Protect the buffer named BUFFER-NAME from side-effects and run BODY.

See `ert-call-with-buffer-renamed' for details.

(fn (BUFFER-NAME-FORM) &body BODY)
(defalias 'ert-with-buffer-renamed '(macro . #[128 "\211\203
\211A\262\242\202\300\301\302GD\"\211G\303U\203 \211@\202'\300\301\302GD\"\304\305\306BBE\207" [signal wrong-number-of-arguments ert-with-buffer-renamed 1 ert-call-with-buffer-renamed lambda nil] 8 (#$ . 8226)]))
(byte-code "\300\301\302\303#\300\207" [function-put ert-with-buffer-renamed lisp-indent-function 1] 4)
#@136 Return the contents of BUFFER after reindentation.

BUFFER defaults to current buffer.  Does not modify BUFFER.

(fn &optional BUFFER)
(defalias 'ert-buffer-string-reindented #[256 "r\211\206pq\210\302C\303\304\305\306\307!\310\"\311$\216\302\211\312 \240\210)r\211\242q\210\313\314ed\"\210)\315 *\262)\207" [buffer-file-name inhibit-read-only nil make-byte-code 0 "\300\242\205\f\302\303\300\242!)\207" vconcat vector [kill-buffer-query-functions nil kill-buffer] 2 clone-buffer t indent-region buffer-string] 8 (#$ . 8777)])
#@499 Execute BODY while collecting messages in VAR.

Capture messages issued by Lisp code and concatenate them
separated by newlines into one string.  This includes messages
written by `message' as well as objects printed by `print',
`prin1' and `princ' to the echo area.  Messages issued from C
code using the above mentioned functions will not be captured.

This is useful for separating the issuance of messages by the
code under test from the behavior of the *Messages* buffer.

(fn VAR &rest BODY)
(defalias 'ert-with-message-capture '(macro . #[385 "\300 \300 \300 \301\302B\303\304\305\n\306\f\307BBEED\310DD\311DDF\312\313\314F\312\315\314F\312\316\314F\312\317\314	F\320\321B\322\323E\322\324\fE\322\325
E\322\326E\257\257\207" [gensym let* ("") lambda (msg) setq concat (msg) ert--make-message-advice ert--make-print-advice advice-add 'message :around 'prin1 'princ 'print unwind-protect progn advice-remove 'print 'princ 'prin1 'message] 19 (#$ . 9319)]))
(byte-code "\300\301\302\303#\210\304\301\305\306#\300\207" [put ert-with-message-capture edebug-form-spec (symbolp body) function-put lisp-indent-function 1] 4)
#@165 Create around advice for `message' for `ert-collect-messages'.
COLLECTOR will be called with the message before it is passed
to the real `message'.

(fn COLLECTOR)
(defalias 'ert--make-message-advice #[257 "\300\301\302\303\304!\305\"\306\307%\207" [make-byte-code 385 "\211\203\211@\301\235\203\302\"\207\302\303\"\300\304P!\210\305\"\207" vconcat vector [("" nil) apply format-message "\n" "%s"] 6 "\n\n(fn FUNC &rest ARGS)"] 7 (#$ . 10476)])
#@397 Create around advice for print functions for `ert-collect-messages'.
The created advice function will just call the original function
unless the output is going to the echo area (when PRINTCHARFUN is
t or PRINTCHARFUN is nil and `standard-output' is t).  If the
output is destined for the echo area, the advice function will
convert it to a string and pass it to COLLECTOR first.

(fn COLLECTOR)
(defalias 'ert--make-print-advice #[257 "\300\301\302\303\304!\305\"\306\307%\207" [make-byte-code 770 "\211\206	\302=\204\"\207\300\303\304!\305\216	!\210)r	q\210\306 +!\210\"\207" vconcat vector [standard-output t generate-new-buffer " *string-output*" #[0 "\301!\207" [standard-output kill-buffer] 2] buffer-string] 6 "\n\n(fn FUNC OBJECT &optional PRINTCHARFUN)"] 7 (#$ . 10939)])
(provide 'ert-x)

Zerion Mini Shell 1.0