Files
emacsd/elpa/ac-js2-20190101.933/ac-js2-tests.elc

20 lines
5.5 KiB
Plaintext
Raw Normal View History

2019-10-09 20:36:55 +02:00
;ELC
;;; Compiled
;;; in Emacs version 26.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.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(byte-code "\301\302!\210\301\303!\210\301\304!\210\301\305!\210\204\306 \210\307\310\311\312\310\313\314\315\316\315&\"\207" [skewer-clients require ert skewer-mode js2-mode ac-js2 run-skewer ert-set-test ac-js2-candidates-test record ert-test "Test the major function that returns candidates for all frontends." #[nil "\306\211\211\211\307\310!r\fq\210\311\216\312c\210\313\306(\314 \210\315\313!\210\316 \210\317c\210\320 \210)\321\322!\210\323c\210\316 \210\320 \210)\321\324!\210\325c\210\316 \210\320 \210)+\326*\3271`\330+\331\n)D0\202m,\332*,@,A)D-\333.\306/\334\216\335*-\"\211.)\204\211\336/!\210).\210+\337 !\210\3260\3401\244\330+\341 )D0\202\261,\3320,@,A)D1\3422\3063\343\216\33501\"\2112)\204\315\3363!\210)2\210+\3264\3441\344\330+\345)D0\202\361,\3324,@,A)D5\3466\3067\347\216\33545\"\2116)\204 \3367!\210)6.\207" [var func-call property-dot property #1=#:temp-buffer ac-js2-evaluate-calls nil generate-new-buffer " *temp*" #[nil "\301!\205 \302!\207" [#1# buffer-name kill-buffer] 2] "\n var temp = function(param1, param2) {\n var localParam = 15;\n return param1 + param2;\n };\n\n var look;\n\ntemp.aFun = function(lolParam) {};\ntemp.anotherFunction = function() { return {about: 3};}" t js2-mode ac-js2-mode js2-parse "tem" ac-js2-candidates delete-char -3 "temp." -5 "temp.aF" assoc (error) ert--should-signal-hook anotherFunction signal #2=#:ert-form-evaluation-aborted-3 #[nil "\305C\306 BD\244\307\n\310\"?\205\311\nD\244\312\313N\211\205\"\314\315 \"D)\244\316\f!\207" [#5=#:fn-0 #6=#:args-1 #7=#:value-2 -explainer- #8=#:form-description-4 (should (assoc 'anotherFunction property-dot)) :form eql #2# :value assoc ert-explainer :explanation apply ert--signal-should-execution] 6] apply ert-fail print (error) aFun #3=#:ert-form-evaluation-aborted-8 #[nil "\305C\306 BD\244\307\n\310\"?\205\311\nD\244\312\313N\211\205\"\314\315 \"D)\244\316\f!\207" [#9=#:fn-5 #10=#:args-6 #11=#:value-7 -explainer- #12=#:form-description-9 (should (assoc 'aFun property)) :form eql #3# :value assoc ert-explainer :explanation apply ert--signal-should-execution] 6] (error) temp #4=#:ert-form-evaluation-aborted-13 #[nil "\305C\306 BD\244\307\n\310\"?\205\311\nD\244\312\313N\211\205\"\314\315 \"D)\244\316\f!\207" [#13=#:fn-10 #14=#:args-11 #15=#:value-12 -explainer- #16=#:form-description-14 (should (assoc 'temp var)) :form eql #4# :value assoc ert-explainer :explanation apply ert--signal-should-execution] 6] ac-js2-external-libraries ac-js2-skewer-candidates #5# signal-hook-function err #6# #7# #8# #9# #10# #11# #12# #13# #14# #15# #16#] 4] nil :passed] 10)
#@67 Utility for testing completion front ends.
TODO: cover more cases
(defalias 'completion-frontend-test '(macro . #[(test-name completion-function) "\302\303\304\305\306\307\310\311\312\313\314\315 DD\316BBBBBBB\317BBBF\207" [test-name completion-function ert-deftest nil let (var) with-temp-buffer (insert "var testComplete = function(param1, param2) {};") (js2-mode) (ac-js2-mode t) (js2-parse) (insert "testComplet") funcall quote ((setq var (thing-at-point 'word))) ((should (string= var "testComplete")))] 14 (#$ . 3090)]))
(byte-code "\300\301\302\303\301\304\305\304\306\304&\"\210\300\307\302\303\307\304\310\304\306\304&\"\207" [ert-set-test auto-complete-test record ert-test nil #[nil "\306\307\310!r q\210\311\216\312c\210\313 \210\314\315!\210\316 \210\317c\210\320 \210\321\322!+\323\32414\325)\326D0\202=\327\f@\fA)D\330\306\331\216\332\n \"\211)\204V\333!\210),\207" [var #1=#:temp-buffer #2=#:fn-15 signal-hook-function err #3=#:args-16 nil generate-new-buffer #8=" *temp*" #[nil "\301!\205 \302!\207" [#1# buffer-name kill-buffer] 2] #10="var testComplete = function(param1, param2) {};" js2-mode ac-js2-mode t js2-parse #11="testComplet" auto-complete thing-at-point word string= (error) ert--should-signal-hook #4="testComplete" signal #5=#:ert-form-evaluation-aborted-18 #[nil "\305C\306 BD\244\307\n\310\"?\205\311\nD\244\312\313N\211\205\"\314\315 \"D)\244\316\f!\207" [#2# #3# #6=#:value-17 -explainer- #7=#:form-description-19 (should #14=(string= var #4#)) :form eql #5# :value string= ert-explainer :explanation apply ert--signal-should-execution] 6] apply ert-fail #6# #7#] 3] :passed completion-at-point-test #[nil "\306\307\310!r q\210\311\216\312c\210\313 \210\314\315!\210\316 \210\317c\210\320 \210\321\322!+\323\32414\325)\326D0\202=\327\f@\fA)D\330\306\331\216\332\n \"\211)\204V\333!\210),\207" [var #9=#:temp-buffer #12=#:fn-20 signal-hook-function err #13=#:args-21 nil generate-new-buffer #8# #[nil "\301!\205 \302!\207" [#9# buffer-name kill-buffer] 2] #10# js2-mode ac-js2-mode t js2-parse #11# completion-at-point thing-at-point word string= (error) ert--should-signal-hook #4# signal #15=#:ert-form-evaluation-aborted-23 #[nil "\305C\306 BD\244\307\n\310\"?\205\311\nD\244\312\313N\211\205\"\314\315 \"D)\244\316\f!\207" [#12# #13# #16=#:value-22 -explainer- #17=#:form-description-24 (should #14#) :form eql #15# :value string= ert-explainer :explanation apply ert--signal-should-execution] 6] apply ert-fail #16# #17#] 3]] 10)