;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302\303\"\210\300\304!\210\300\305!\207" [require sly-stickers sly-tests "lib/sly-tests" cl-lib ert-x] 3) (defvar sly-stickers--test-debug nil) #@40 (fn FUNCTION FORMS STICKER-PREFIXES) (defalias 'sly-stickers--call-with-fixture #[771 "\302\303!\304\305\306\307!\210\310\311!\210\312\313\"\216r\314!q\210\315 \210\316\317\320\321\"\322#c\210\323!\210\305:\203I@\262db\210\324!\210\325\326!\210A\262\202.\266 \210\310\311!,\207" [sly-net-send-translator sly-flash-inhibit make-temp-file "sly-stickers--fixture" t nil sly-eval-async (cl:ignore-errors (cl:delete-package :slynk-stickers-fixture)) sly-sync-to-top-level 1 make-closure #[0 " \203 \302\303\300\"\207\304\300!\211\203\305!\210\210\306\300!\207" [V0 sly-stickers--test-debug sly-message "leaving file %s" find-buffer-visiting kill-buffer delete-file] 3] find-file lisp-mode mapconcat pp-to-string append ((defpackage :slynk-stickers-fixture (:use :cl)) (in-package :slynk-stickers-fixture)) "\n" write-file search-backward call-interactively sly-stickers-dwim] 9 (#$ . 261)]) #@44 (fn (FORMS STICKER-PREFIXES) &rest BODY) (defalias 'sly-stickers--with-fixture '(macro . #[128 "\211\203 \211A\262\242\202\300\301\302GD\"\211G\303U\203$\211A\262\242\202+\300\301\302GD\"\242\304\305\306\307BBDF\207" [signal wrong-number-of-arguments sly-stickers--with-fixture 2 sly-stickers--call-with-fixture function lambda nil] 9 (#$ . 1177)])) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put sly-stickers--with-fixture lisp-indent-function defun put edebug-form-spec (sexp &rest form)] 5) (defalias 'sly-stickers--topmost-sticker #[0 "\300`!@\207" [sly-button--overlays-at] 2]) #@16 (fn STICKER) (defalias 'sly-stickers--base-face #[257 "\300\301\"\211:\204\n\207\302\303\"\207" [button-get face plist-get :inherit] 5 (#$ . 1803)]) #@13 (fn FACE) (defalias 'sly-stickers--face-p #[257 "\300 \301!=\207" [sly-stickers--topmost-sticker sly-stickers--base-face] 5 (#$ . 1963)]) (byte-code "\300\301\302\303\301\304\305\306\307\310&\"\210\300\311\302\303\311\312\313\306\307\314&\"\210\300\315\302\303\315\316\317\306\307\320&\"\210\300\321\302\303\321\322\323\306\307\324&\"\210\300\325\302\303\325\326\327\306\307\330&\"\210\331\332!\207" [ert-set-test stickers-basic-navigation record ert-test "Test that setting stickers and navigating to them works" #[0 "\300\301\302\303#\207" [sly-stickers--call-with-fixture #[0 "eb\210\301\302!\210\212\303C\3041\305\306p!)\307D0\202%\310\240\210\211@AD\262\311C\312C\313\314%\216\315\242\"\240)\204A\316\242!\210\266)\301\317!\210\212\303C\3201[\305\306p!)\321D0\202f\310\240\210\211@AD\262\322C\312C\313\323%\216\315\242\"\240)\204\202\316\242!\210\266)\301\324!\210\212\303C\3251\234\305\306p!)\326D0\202\247\310\240\210\211@AD\262\327C\312C\313\330%\216\315\242\"\240)\204\303\316\242!\210\266)\331C\3321\331\305\333\334\335 !)D0\202\344\310\240\210\211@AD\262\336C\312C\313\337%\216\315\242\"\240)\204\316\242!\210\210\211\242\207" [signal-hook-function ert-simulate-command (sly-stickers-next-sticker 1) equal (error) ert--should-signal-hook read #1=(bar (baz)) signal #2=#:ert-form-evaluation-aborted-8118 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 (read (current-buffer)) '#1#)) :form #2# :value equal ert-explainer :explanation apply ert--signal-should-execution] 7] apply ert-fail (sly-stickers-next-sticker 1) (error) #3=(baz) #4=#:ert-form-evaluation-aborted-8123 #[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 (read (current-buffer)) '#3#)) :form #4# :value equal ert-explainer :explanation apply ert--signal-should-execution] 7] (sly-stickers-next-sticker 1) (error) #5=(coiso (cena)) #6=#:ert-form-evaluation-aborted-8128 #[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 (read (current-buffer)) '#5#)) :form #6# :value equal ert-explainer :explanation apply ert--signal-should-execution] 7] eq (error) sly-stickers-placed-face sly-stickers--base-face sly-stickers--topmost-sticker #7=#:ert-form-evaluation-aborted-8133 #[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 'sly-stickers-placed-face (sly-stickers--base-face (sly-stickers--topmost-sticker)))) :form #7# :value eq ert-explainer :explanation apply ert--signal-should-execution] 7]] 10] ((defun foo nil (bar (baz))) (defun quux nil (coiso (cena)))) ("(bar" "(baz" "(coiso")] 4] nil :passed (sly contrib stickers-tests) stickers-should-stick "Test trying to compile the buffer and checking that stickers stuck" #[0 "\300\301\302\303#\207" [sly-stickers--call-with-fixture #[0 "\300\301!\210\302\303!\210\304\305!\204\306\307!\210\310\311!\210\304\312!\204 \306\313!\210\300\301!\210\302\303!\210\304\305!\2042\306\314!\210\310\315!\210\304\305!?\205@\306\316!\207" [call-interactively sly-compile-defun sly-sync-to-top-level 1 sly-stickers--face-p sly-stickers-armed-face ert-fail "Expected QUUX stickers to be armed" ert-simulate-command (sly-stickers-prev-sticker 1) sly-stickers-placed-face "Compiled just the QUUX defun, didn't expect FOO stickers to arm." "Expected innermost FOO sticker to be armed by now." (sly-stickers-prev-sticker 1) "Expected outermost FOO sticker to also be armed by now."] 2] ((defun foo nil (bar (baz))) (defun quux nil (coiso (cena)))) ("(bar" "(baz" "(coiso")] 4] (sly contrib stickers-tests) stickers-when-invalid-dont-stick "Test trying to make invalid stickers stick" #[0 "\300\301\302\303#\207" [sly-stickers--call-with-fixture #[0 "eb\210\300\301!\210\302\303!\204\304\305!\210\306\307!\210\310\311!\210\302\303!\204#\304\312!\210\300\313!\210\302\303!\2041\304\314!\210\300\315!\210\302\303!?\205?\304\314!\207" [ert-simulate-command (sly-stickers-next-sticker 1) sly-stickers--face-p sly-stickers-placed-face ert-fail "Expected FOO sticker to be unarmed" call-interactively sly-compile-defun sly-sync-to-top-level 1 "Expected invalid FOO sticker to remain unarmed" (sly-stickers-next-sticker 1) "Expected valid FOO sticker to remain unarmed" (sly-stickers-next-sticker 1)] 2] ((defun foo nil (bar (baz)))) ("(bar" "(baz" "foo")] 4] (sly contrib stickers-tests) stickers-in-a-file "No docstring for this test." #[0 "\300\301\302\303#\207" [sly-stickers--call-with-fixture #[0 "eb\210\300\301!\210\302\303!\210\304\305!\210\306\307!\204\310\311!\210\304\312!\210\306\307!\204'\310\313!\210\304\314!\210\306\315!?\2055\310\316!\207" [call-interactively sly-compile-and-load-file sly-sync-to-top-level 1 ert-simulate-command (sly-stickers-next-sticker 1) sly-stickers--face-p sly-stickers-armed-face ert-fail "Expected BAR sticker to be armed" (sly-stickers-next-sticker 1) "Expected BAZ sticker to be armed" (sly-stickers-next-sticker 1) sly-stickers-placed-face "Didn't expect COISO sticker to be armed"] 2] ((defun foo nil (bar (baz))) (defun bar (x) (values (list x) 'bar)) (defun baz nil 42) (defun xpto nil (let ((coiso)) coiso))) ("(bar" "(baz" "(coiso")] 4] (sly contrib stickers-tests) stickers-record-stuff "Test actually checking stickers' values." #[0 "\300\301\302\303#\207" [sly-stickers--call-with-fixture #[0 "eb\210\300\301!\210\302\303!\210\304\305!\210\306\307!\204\310\311!\210\312\313!\210\302\303!\210\300\314!\210\302\303!\210\306\315!?\2053\310\316!\207" [call-interactively sly-compile-and-load-file sly-sync-to-top-level 1 ert-simulate-command (sly-stickers-next-sticker 1) sly-stickers--face-p sly-stickers-armed-face ert-fail "Expected BAR sticker to be armed by now" sly-eval-async (slynk-stickers-fixture::foo) sly-stickers-fetch sly-stickers-recordings-face "Expected BAR sticker to have some information"] 2] ((defun foo nil (bar (baz))) (defun bar (x) (values (list x) 'bar)) (defun baz nil 42)) ("(bar" "(baz")] 4] (sly contrib stickers-tests) provide sly-stickers-tests] 10)