;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\207" [require ert erlang] 2) #@262 Alist of erlang test code. Each entry have the format (TAGNAME . ERLANG_CODE). If TAGNAME is nil there is no definitions in the ERLANG_CODE. The ERLANG_CODE is a single line of erlang code. These lines will be concatenated to form an erlang file to test on. (defvar erlang-test-code '((nil . "-module(erlang_test).") (nil . "-import(lists, [map/2]).") (nil . "-compile(export_all).") ("SYMBOL" . "-define(SYMBOL, value).") ("MACRO" . "-define(MACRO(X), X + X).") ("struct" . "-record(struct, {until,maps,are,everywhere}).") ("function" . "function() -> #struct{}.")) (#$ . 152)) (byte-code "\300\301\302\303\301\304\305\304\306\304&\"\207" [ert-set-test erlang-test-tags record ert-test nil #[0 "\306\307\310\"\311\312\"\311\313\"\314\300!\314\301!\315\211\315\211\315\211C\315\211\315\316\317&\216\320\300\315\"\210\320\301\315\"\210\321!\210\322\"\210\211\323!\240\210\324W\203gr\211\242q\210\325\300!\210)\202l\326\310\"\210\327!\210\330 \210\331\242\". \207" [tags-file-name tags-table-list tags-table-set-list tags-add-tables tags-completion-table erlang-mode-hook make-temp-file "erlang-test" t expand-file-name "erlang_test.erl" "TAGS" default-value nil make-closure #[0 "\305\304\242!\203\f\306\304\242!\210\307\301!\305!\203\306!\210\210\310\300!\203%\311\300\312\"\210\313\314\302\"\210\313\315\303\"\207" [V0 V1 V2 V3 V4 buffer-live-p kill-buffer find-buffer-visiting file-exists-p delete-directory t set-default tags-file-name tags-table-list] 3] set-default erlang-test-create-erlang-file erlang-test-compile-tags find-file-noselect 26 make-local-variable visit-tags-table erlang-test-complete-at-point erlang-test-completion-table erlang-test-xref-find-definitions prog-mode-hook erlang-shell-mode-hook emacs-major-version] 14] :passed] 10) #@20 (fn ERLANG-FILE) (defalias 'erlang-test-create-erlang-file #[257 "\211\301\302\303\"\304\305\"\216r\211q\210\306\211:\203.@\262\211A\262\242\262\307\261\210A\262\202\266)\306rq\210\310\306\211\306\311%\210*\207" [erlang-test-code generate-new-buffer " *temp file*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] nil "\n" write-region 0] 10 (#$ . 1963)]) #@30 (fn ERLANG-FILE TAGS-FILE) (defalias 'erlang-test-compile-tags #[514 "\301C\3021\303\304\305\306\307\211\211\310\n&)D0\202&\311\240\210\211@AD\262\312C\307C\313\314%\216\315\242\"\240)\204B\316\242!\210\210\211\242\207" [signal-hook-function = (error) ert--should-signal-hook 0 call-process #2="etags" nil #3="-o" signal #1=#:ert-form-evaluation-aborted-151 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 (zerop (call-process #2# nil nil nil #3# tags-file erlang-file))) :form #1# :value = ert-explainer :explanation apply ert--signal-should-execution] 7] apply ert-fail] 12 (#$ . 2378)]) (defalias 'erlang-test-completion-table #[0 "\303\304\301 \210)\305C\3061\307\310 \311\"\310\312 \311\")D0\202*\313\240\210\211@AD\262\314C\304C\315\316%\216\317\242\"\240)\204F\320\242!\210\210\211\242\207" [erlang-replace-etags-tags-completion-table tags-completion-table signal-hook-function t nil equal (error) ert--should-signal-hook sort string-lessp erlang-expected-completion-table signal #1=#:ert-form-evaluation-aborted-156 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 (sort tags-completion-table #'string-lessp) (sort (erlang-expected-completion-table) #'string-lessp))) :form #1# :value equal ert-explainer :explanation apply ert--signal-should-execution] 7] apply ert-fail] 10]) (defalias 'erlang-expected-completion-table #[0 "\301\302\211\211:\203-@\262\211A\262\242\262;\203&\303\304PD!\244\262A\262\202\211\237\266\204\304\305D\"\207" [erlang-test-code append nil reverse "erlang_test:" "erlang_test:module_info"] 9]) #@34 (fn ERLANG-FILE ERLANG-BUFFER) (defalias 'erlang-test-xref-find-definitions #[514 "\301\211\211\302:\203K@\262\211A\262\242\262\211\203\303\202 T\262\203A\304!\210\305#\210\306\230\203A\305\307P#\210A\262\301\262\202\266\305\307\303#\207" [erlang-test-code nil t 1 switch-to-buffer erlang-test-xref-jump "function" "erlang_test:"] 11 (#$ . 4277)]) #@39 (fn ID EXPECTED-FILE EXPECTED-LINE) (defalias 'erlang-test-xref-jump #[771 "db\210\300\261\210\301 \210\302\303!\203\303\304\305 !!\210\202\306\307!\210\310\"\207" ["\n%% " save-buffer fboundp xref-find-definitions erlang-id-to-string erlang-get-identifier-at-point error "xref-find-definitions not defined (too old emacs?)" erlang-test-verify-pos] 6 (#$ . 4667)]) #@36 (fn EXPECTED-FILE EXPECTED-LINE) (defalias 'erlang-test-verify-pos #[514 "\301C\3021\303\304!\304\305 !)D0\202 \306\240\210\211@AD\262\307C\310C\311\312%\216\313\242\"\240)\204<\314\242!\210\266\315C\3161O\303\317 )D0\202Z\306\240\210\211@AD\262\320C\310C\311\321%\216\313\242\"\240)\204v\314\242!\210\266\322C\3231\211\303\324 `)D0\202\224\306\240\210\211@AD\262\325C\310C\311\326%\216\313\242\"\240)\204\260\314\242!\210\210\211\242\207" [signal-hook-function string-equal (error) ert--should-signal-hook file-truename buffer-file-name signal #1=#:ert-form-evaluation-aborted-161 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 (string-equal (file-truename expected-file) (file-truename (buffer-file-name)))) :form #1# :value string-equal ert-explainer :explanation apply ert--signal-should-execution] 7] apply ert-fail eq (error) line-number-at-pos #2=#:ert-form-evaluation-aborted-166 #[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 expected-line (line-number-at-pos))) :form #2# :value eq ert-explainer :explanation apply ert--signal-should-execution] 7] = (error) point-at-bol #3=#:ert-form-evaluation-aborted-171 #[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 (= (point-at-bol) (point))) :form #3# :value = ert-explainer :explanation apply ert--signal-should-execution] 7]] 12 (#$ . 5048)]) #@18 (fn TAGS-FILE) (defalias 'erlang-test-complete-at-point #[257 "\302\303\304\"r\211q\210\305\306\"\216\307 \210\310\300!\210\311c\210\312 \210\313C\3141-\315\316\317 )D0\2028\320\240\210\211@AD\262\321C\322C\305\323%\216\324\242\"\240)\204T\325\242!\210\266\326c\210\312 \210\313C\3271m\315\330\317 )D0\202x\320\240\210\211@AD\262\331C\322C\305\332%\216\324\242\"\240)\204\224\325\242!\210\266\333c\210\312 \210\313C\3341\255\315\335\317 )D0\202\270\320\240\210\211@AD\262\336C\322C\305\337%\216\324\242\"\240)\204\324\325\242!\210\210\211\242\262\266\202*\207" [tags-file-name signal-hook-function generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] erlang-mode make-local-variable "\nerlang_test:fun" erlang-complete-tag looking-back (error) ert--should-signal-hook #2="erlang_test:function" point-at-bol signal #1=#:ert-form-evaluation-aborted-176 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-back #2# (point-at-bol))) :form #1# :value looking-back ert-explainer :explanation apply ert--signal-should-execution] 7] apply ert-fail "\nfun" (error) #4="function" #3=#:ert-form-evaluation-aborted-181 #[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-back #4# (point-at-bol))) :form #3# :value looking-back ert-explainer :explanation apply ert--signal-should-execution] 7] "\nerlang_" (error) #6="erlang_test:" #5=#:ert-form-evaluation-aborted-186 #[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-back #6# (point-at-bol))) :form #5# :value looking-back ert-explainer :explanation apply ert--signal-should-execution] 7]] 12 (#$ . 6837)]) (byte-code "\300\301\302\303\301\304\305\304\306\304&\"\207" [ert-set-test erlang-test-compile-options record ert-test nil #[0 "\300\301\302\"\210\300\303\304\"\210\300\305\306B\307\"\210\300\305C\310\"\210\300\305\306D\311\"\210\300\305\306\312E\313\"\210\300\314\315\"\210\300\316\317\"\210\300\320\321\"\210\300\322\323\"\210\300\324\307\"\210\300\325\326\"\207" [erlang-test-format-opt t "t" nil "nil" 1 2 "{1, 2}" "[1]" "[1, 2]" 3 "[1, 2, 3]" symbol "symbol" "string" "\"string\"" [] "{}" [1] "{1}" [1 2] [1 2 (3 [4 5 6] 7)] "{1, 2, [3, {4, 5, 6}, 7]}"] 4] :passed] 10) #@40 (fn ELISP &optional EXPECTED-ERLANG) (defalias 'erlang-test-format-opt #[513 "\301!\302\303#\210\203F\304C\3051\306)D0\202(\307\240\210\211@AD\262\310C\311C\312\313%\216\314\242\"\240)\204D\315\242!\210\266\207" [signal-hook-function inferior-erlang-format-opt message "%s -> %s" equal (error) ert--should-signal-hook signal #1=#:ert-form-evaluation-aborted-191 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 erlang expected-erlang)) :form #1# :value equal ert-explainer :explanation apply ert--signal-should-execution] 7] apply ert-fail] 13 (#$ . 9509)]) (byte-code "\300\301\302\303\301\304\305\304\306\304&\"\210\307\310!\207" [ert-set-test erlang-test-parse-id record ert-test nil #[0 "\301\302\303\302\211\211\211\211:\203\256@\262:\203\256@\262\304!\262\305C\30612\307)D0\202=\310\240\210\211@AD\262\311C\302C\312\313%\216\314\242\"\240)\204Y\315\242!\210\266\316!\262\305C\3171q\307)D0\202|\310\240\210\211@AD\262\320C\302C\312\321%\216\314\242\"\240)\204\230\315\242!\210\266B\262A\262A\262\302\262\202\237\207" [signal-hook-function ("fun/10" "qualified-function module:fun/10" "record reko" "macro _SYMBOL" "macro MACRO/10" "module modula" "macro" nil) nil ((nil nil "fun" 10) (qualified-function "module" "fun" 10) (record nil "reko" nil) (macro nil "_SYMBOL" nil) (macro nil "MACRO" 10) (module nil "modula" nil) (nil nil "macro" nil) nil) erlang-id-to-list equal (error) ert--should-signal-hook signal #1=#:ert-form-evaluation-aborted-196 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 id-list id-list2)) :form #1# :value equal ert-explainer :explanation apply ert--signal-should-execution] 7] apply ert-fail erlang-id-to-string (error) #2=#:ert-form-evaluation-aborted-201 #[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 id-string id-string2)) :form #2# :value equal ert-explainer :explanation apply ert--signal-should-execution] 7]] 18] :passed provide erlang-test] 10)