MMCT TEAM
Server IP : 111.118.215.189  /  Your IP : 3.143.244.92
Web Server : Apache
System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : a1673wkz ( 2475)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /usr/share/emacs/24.3/lisp/emacs-lisp/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //usr/share/emacs/24.3/lisp/emacs-lisp/ert-x.elc
;ELC
;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:09:03 2024
;;; from file /builddir/build/BUILD/emacs-24.3/lisp/emacs-lisp/ert-x.el
;;; in Emacs version 24.3.1
;;; 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)
#@94 Return a string containing STRING as a text button with PROPERTIES.

See `make-text-button'.
(defalias 'ert--text-button #[(string &rest properties) "\303\304!rq\210\305\216	c\210\306\307ed\n$\210\310 +\207" [#1=#:temp-buffer string properties generate-new-buffer " *temp*" ((byte-code "\301!\203\n\302!\210\301\207" [#1# buffer-name kill-buffer] 2)) apply make-text-button buffer-string] 5 (#$ . 574)])
#@90 Compute a test buffer name based on BASE-NAME.

Helper function for `ert--test-buffers'.
(defalias 'ert--format-test-buffer-name #[(base-name) "\303\304\305 \203\305 \211\306H	>\204\307\310\311\312#\210\313H)\206 \314\n\203+\303\315\n\"\202,\316#\207" [cl-x cl-struct-ert-test-tags base-name format "*Test buffer (%s)%s*" ert-running-test 0 error "%s accessing a non-%s" ert-test-name ert-test 1 "<anonymous test>" ": %s" ""] 7 (#$ . 989)])
#@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) (#$ . 1446))
(define-button-type 'ert--test-buffer-button 'action 'ert--test-buffer-button-action 'help-echo "mouse-2, RET: Pop to test buffer")
#@56 Pop to the test buffer that BUTTON is associated with.
(defalias 'ert--test-buffer-button-action #[(button) "\301\302\303\"!\207" [button pop-to-buffer button-get ert--test-buffer] 4 (#$ . 1885)])
#@151 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.
(defalias 'ert--call-with-test-buffer #[(ert--base-name ert--thunk) "\306\307!!\310\311	!\312\313\314	%\315	\316#\210r	q\210\317\nB\fB
 *\320	!\210\321	\"\210*\207" [ert--base-name ert--buffer ert--button ert--test-buffers ert--infos ert--thunk 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] 6 (#$ . 2090)])
#@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 . #[(&rest body) "\203\f\211A@\202\304\305\306GD\"\307	>A@	\203F@\310>\203/AA\211\202\311	>A@\203=\312\211\202\313\314@\"\210\202)\315\n\316\312BBE*\207" [body #1=#:--cl-rest-- name-form #2=#:--cl-keys-- signal wrong-number-of-arguments ert-with-test-buffer :name (:name :allow-other-keys) :allow-other-keys nil error "Keyword argument %s not one of (:name)" ert--call-with-test-buffer lambda] 6 (#$ . 2681)]))
(byte-code "\300\301\302\303#\210\300\301\304\305#\210\300\301\304\305#\207" [put ert-with-test-buffer edebug-form-spec ((form) body) lisp-indent-function 1] 4)
#@44 Kill all test buffers that are still live.
(defalias 'ert-kill-all-test-buffers #[nil "\302\303\304	\"\210\305\306\307	!#\210)\310	!\210\311\207" [count ert--test-buffers 0 maphash #[(buffer dummy) "\302!\203\f\303!\205	T\211\207" [buffer count buffer-live-p kill-buffer] 2] message "%s out of %s test buffers killed" hash-table-count clrhash nil] 5 (#$ . 3670) nil])
#@529 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.
(defalias 'ert-simulate-command #[(command) "<\204\f\306\307\310D\"\210\311@!\204\306\307\312@D\"\210	\203&\306\307\313	D\"\210\314\211@\315\f!\2064\f\316\317!\210\320@A\"\316\321!\210\322\323!\203S\203S\316\324!\210@\"
#\322\325!\203d\"\203\374$\203\374\314%$\204z%\205\372&\326=\203\211$\242\326=\202\213&\203\306\327 \203\306\330 \203\306'\203\251\331\332'\"\210\314'\202\306\333 \334 U\204\306\335\332!\204\275\336\332!\204\306\331\332\333 \334 {\"\210%\204\347$\337=\204\340$\242\326=\203\347$A\204\347\314\211$\202\372$\242\326=\203\364$A$\314(\316\340!)\210	\203\306\307\341	D\"\210\n)\207" [command unread-command-events return-value deactivate-mark this-original-command this-command signal cl-assertion-failed (listp command) commandp (commandp (car command)) (not unread-command-events) nil command-remapping run-hooks pre-command-hook apply post-command-hook boundp deferred-action-list deferred-action-function last-repeatable-command only region-active-p display-selections-p x-set-selection PRIMARY region-beginning region-end x-selection-owner-p x-selection-exists-p lambda deactivate-mark-hook (not unread-command-events) real-last-command last-command transient-mark-mode force select-active-regions saved-region-selection mark-active] 5 (#$ . 4053)])
#@47 Run all idle timers (from `timer-idle-list').
(defalias 'ert-run-idle-timers #[nil "\303!\304\211\205\n@\305	!\210\nA\211\204\n\304*\207" [timer-idle-list timer --dolist-tail-- copy-sequence nil timer-event-handler] 3 (#$ . 5927)])
#@267 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.
(defalias 'ert-filter-string #[(s &rest regexps) "\306\307!rq\210\310\216	c\210\n\311\211\203a\f@\211<\203!\202$\312B\211G\313U\2034
\211A@\202;\314\315\311
GD\"
@eb\210\316\311\317#\203Y\320\321\317\211\311%\210\202D+\fA\211\204*\322 +\207" [#1=#:temp-buffer s regexps x --dolist-tail-- #2=#:--cl-rest-- generate-new-buffer " *temp*" ((byte-code "\301!\203\n\302!\210\301\207" [#1# buffer-name kill-buffer] 2)) nil (nil) 2 signal wrong-number-of-arguments re-search-forward t replace-match "" buffer-string regexp subexp] 7 (#$ . 6174)])
#@624 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.
(defalias 'ert-propertized-string #[(&rest args) "\306\307!rq\210\310\216\311\n\311:\203R@\211;\203,`\fc\210\312
`	#\210)\202K\f<\203E\313\314\fG\315\"!\204@\316\317\f\"\210\f\202K\316\320\f\321#\210A\211\202+\322 +\207" [#1=#:temp-buffer current-plist args #2=#:--cl-var-- x begin generate-new-buffer " *temp*" ((byte-code "\301!\203\n\302!\210\301\207" [#1# buffer-name kill-buffer] 2)) nil set-text-properties zerop mod 2 error "Odd number of args in plist: %S" "cl-etypecase failed: %s, %s" (string list) buffer-string] 5 (#$ . 7016)])
#@370 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*.
(defalias 'ert-call-with-buffer-renamed #[(buffer-name thunk) "\303\304\305\"!r\306!q\210\307\301J!\210)\310\216\306!\210\n *\207" [buffer-name #1=#:--cl-new-buffer-name-- thunk generate-new-buffer-name format "%s orig buffer" get-buffer-create rename-buffer ((byte-code "\301!\203\n\302!\210r\303Jq\210\304!\210)\301\207" [buffer-name get-buffer kill-buffer #1# rename-buffer] 2))] 4 (#$ . 8209)])
#@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 . #[(&rest body) "\203\f\211A@\202\303\304\305GD\"\211G\306U\203 	@\202'\303\304\305	GD\"\307\n\310\311BBE*\207" [body #1=#:--cl-rest-- buffer-name-form signal wrong-number-of-arguments ert-with-buffer-renamed 1 ert-call-with-buffer-renamed lambda nil] 6 (#$ . 8992)]))
(put 'ert-with-buffer-renamed 'lisp-indent-function 1)
#@113 Return the contents of BUFFER after reindentation.

BUFFER defaults to current buffer.  Does not modify BUFFER.
(defalias 'ert-buffer-string-reindented #[(&optional buffer) "r\206pq\210\304\305\216\304\306 )r	q\210\307\310ed\"\210)\311 ,\207" [buffer clone buffer-file-name inhibit-read-only nil ((byte-code "\203\302\303!\210)\302\207" [clone kill-buffer-query-functions nil kill-buffer] 2)) clone-buffer t indent-region buffer-string] 3 (#$ . 9533)])
(provide 'ert-x)

MMCT - 2023