;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\207" [require diff-hl subr-x ert] 2) (defvar diff-hl-test-source-file (byte-code "\300\301\302\303!!\304P!\207" [expand-file-name file-name-directory locate-library "diff-hl" "test/empty"] 4)) (defvar diff-hl-test-initial-content nil) #@19 (fn &rest BODY) (defalias 'diff-hl-test-in-source '(macro . #[128 "\300\301BB\207" [save-window-excursion (find-file diff-hl-test-source-file)] 4 (#$ . 370)])) (put 'diff-hl-test-in-source 'lisp-indent-function 0) (defalias 'diff-hl-test-init #[0 "\302 \303\304\"\216\305!\210\306 )\210\307\207" [diff-hl-test-source-file diff-hl-test-initial-content current-window-configuration make-closure #[0 "\301\300!\207" [V0 set-window-configuration] 2] find-file buffer-string t] 4]) (defalias 'diff-hl-test-teardown #[0 "\302 \303\304\"\216\305!\210\306 \210 c\210\307 )\207" [diff-hl-test-source-file diff-hl-test-initial-content current-window-configuration make-closure #[0 "\301\300!\207" [V0 set-window-configuration] 2] find-file erase-buffer save-buffer] 4]) (defalias 'diff-hl-test-compute-diff-lines #[0 "\302 \303\304\"\216\305!\210\306 \210\307\310 \210)\311\312!\210\313eeb\210`dW\2036\314y\210\315\316`\"!B\262`\262\202\317\313\237\"\266\202)\207" [diff-hl-test-source-file vc-diff-switches current-window-configuration make-closure #[0 "\301\300!\207" [V0 set-window-configuration] 2] find-file save-buffer "-w" diff-hl-diff-goto-hunk switch-to-buffer "*vc-diff*" nil 1 string-trim buffer-substring-no-properties delq] 7]) #@24 (fn NAME &rest BODY) (defalias 'diff-hl-deftest '(macro . #[385 "\300\301\302\303\304B\305BB\257\207" [ert-deftest nil (diff-hl-test-init) unwind-protect progn ((diff-hl-test-teardown))] 9 (#$ . 1626)])) (byte-code "\300\301\302\303#\210\304\305\306\307\305\310\311\310\312\310&\"\210\304\313\306\307\313\310\314\310\312\310&\"\210\304\315\306\307\315\310\316\310\312\310&\"\210\304\317\306\307\317\310\320\310\312\310&\"\210\304\321\306\307\321\310\322\310\312\310&\"\207" [put diff-hl-deftest lisp-indent-function defun ert-set-test diff-hl-insert record ert-test nil #[0 "\302 \210\303\216\304 \305\306\"\216\307!\210db\210\310c\210\311C\3121*\313\314\315\316 !@)D0\2025\317\240\210\211@AD\262\320C\321C\305\322%\216\323\242\"\240)\204Q\324\242!\210\210\211\242\262\266\202)\262)\207" [diff-hl-test-source-file signal-hook-function diff-hl-test-init #[0 "\300 \207" [diff-hl-test-teardown] 1] current-window-configuration make-closure #[0 "\301\300!\207" [V0 set-window-configuration] 2] find-file "added\n" equal (error) ert--should-signal-hook #1="+added" last diff-hl-test-compute-diff-lines signal #2=#:ert-form-evaluation-aborted-794 nil #[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 #1# (car (last (diff-hl-test-compute-diff-lines))))) :form #2# :value equal ert-explainer :explanation apply ert--signal-should-execution] 7] apply ert-fail] 11] :passed diff-hl-remove #[0 "\302 \210\303\216\304 \305\306\"\216\307!\210ed|\210\310C\3111(\312\313\314\315 !@)D0\2023\316\240\210\211@AD\262\317C\320C\305\321%\216\322\242\"\240)\204O\323\242!\210\210\211\242\262\266\202)\262)\207" [diff-hl-test-source-file signal-hook-function diff-hl-test-init #[0 "\300 \207" [diff-hl-test-teardown] 1] current-window-configuration make-closure #[0 "\301\300!\207" [V0 set-window-configuration] 2] find-file equal (error) ert--should-signal-hook #3="-last line" last diff-hl-test-compute-diff-lines signal #4=#:ert-form-evaluation-aborted-799 nil #[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 #3# (car (last (diff-hl-test-compute-diff-lines))))) :form #4# :value equal ert-explainer :explanation apply ert--signal-should-execution] 7] apply ert-fail] 11] diff-hl-indirect-buffer-insert #[0 "\302 \210\303\216\304 \305\306\"\216\307!\210ed}\210db\210\310c\210\311C\3121.\313\314\315\316 !@)D0\2029\317\240\210\211@AD\262\320C\321C\305\322%\216\323\242\"\240)\204U\324\242!\210\210\211\242\262\266\202)\262)\207" [diff-hl-test-source-file signal-hook-function diff-hl-test-init #[0 "\300 \207" [diff-hl-test-teardown] 1] current-window-configuration make-closure #[0 "\301\300!\207" [V0 set-window-configuration] 2] find-file "added\n" equal (error) ert--should-signal-hook #5="+added" last diff-hl-test-compute-diff-lines signal #6=#:ert-form-evaluation-aborted-804 nil #[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 #5# (car (last (diff-hl-test-compute-diff-lines))))) :form #6# :value equal ert-explainer :explanation apply ert--signal-should-execution] 7] apply ert-fail] 11] diff-hl-indirect-buffer-remove #[0 "\302 \210\303\216\304 \305\306\"\216\307!\210ed}\210eb\210`d|\210\310C\3111/\312\313\314\315 !@)D0\202:\316\240\210\211@AD\262\317C\320C\305\321%\216\322\242\"\240)\204V\323\242!\210\210\211\242\262\266\202)\262)\207" [diff-hl-test-source-file signal-hook-function diff-hl-test-init #[0 "\300 \207" [diff-hl-test-teardown] 1] current-window-configuration make-closure #[0 "\301\300!\207" [V0 set-window-configuration] 2] find-file equal (error) ert--should-signal-hook #7="-last line" last diff-hl-test-compute-diff-lines signal #8=#:ert-form-evaluation-aborted-809 nil #[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 #7# (car (last (diff-hl-test-compute-diff-lines))))) :form #8# :value equal ert-explainer :explanation apply ert--signal-should-execution] 7] apply ert-fail] 11] diff-hl-indirect-buffer-move #[0 "\301 \210\302\216\303 \304\305\"\216\306!\210ed}\210eb\210\307\310!\210db\210\311c\210\312 \210\313\314!\210\315 \210\316C\31717\320C0\202B\321\240\210\211@AD\262\322C\323C\304\324%\216\325\242\"\240)\204^\326\242!\210\266\315 \210\316C\3271o\330C0\202z\321\240\210\211@AD\262\331C\323C\304\332%\216\325\242\"\240)\204\226\326\242!\210\266\315C\3331\243\3230\202\256\321\240\210\211@AD\262\334C\323C\323\304\335\"\3361\326\304\337%\216\325\242\"\240)0\210\202\345\340\262\341\342\323$\210\240\266\204\363\326\343 \344\345D\"!\210\266\346 \210\316C\3471\320C0\202\321\240\210\211@AD\262\350C\323C\304\351%\216\325\242\"\240)\204+\326\242!\210\266\346C\35218\3230\202C\321\240\210\211@AD\262\353C\323C\323\304\354\"\3551k\304\356%\216\325\242\"\240)0\210\202z\340\262\341\342\323$\210\240\266\204\210\326\343 \344\345D\"!\210\266\211\242\262\266\202)\262)\207" [diff-hl-test-source-file diff-hl-test-init #[0 "\300 \207" [diff-hl-test-teardown] 1] current-window-configuration make-closure #[0 "\301\300!\207" [V0 set-window-configuration] 2] find-file kill-whole-line 3 "added\n" save-buffer diff-hl-mode 1 diff-hl-previous-hunk looking-at (error) #9="added" signal #10=#:ert-form-evaluation-aborted-814 nil #[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 (looking-at #9#)) :form #10# :value looking-at ert-explainer :explanation apply ert--signal-should-execution] 7] apply ert-fail (error) #11="function2" #12=#:ert-form-evaluation-aborted-819 #[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 (looking-at #11#)) :form #12# :value looking-at ert-explainer :explanation apply ert--signal-should-execution] 7] (error) #13=#:ert-form-evaluation-aborted-824 #[0 "\300\242\207" [V0] 1] (error) #[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-error (diff-hl-previous-hunk) :type 'user-error) :form #13# :value diff-hl-previous-hunk ert-explainer :explanation apply ert--signal-should-execution] 7] t ert--should-error-handle-error user-error append :fail-reason "did not signal an error" diff-hl-next-hunk (error) #14=#:ert-form-evaluation-aborted-831 #[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 (looking-at "added")) :form #14# :value looking-at ert-explainer :explanation apply ert--signal-should-execution] 7] (error) #15=#:ert-form-evaluation-aborted-836 #[0 "\300\242\207" [V0] 1] (error) #[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-error (diff-hl-next-hunk) :type 'user-error) :form #15# :value diff-hl-next-hunk ert-explainer :explanation apply ert--signal-should-execution] 7]] 13]] 10) (defalias 'diff-hl-run-tests #[0 "\300 \207" [ert-run-tests-batch] 1]) (provide 'diff-hl-test)