;ELC ;;; Compiled ;;; in Emacs version 26.3 ;;; 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 "\300\301!\210\300\302!\210\300\303!\207" [require ert phps-mode phps-mode-macros] 2) #@147 Set up test buffer with SOURCE, TITLE, apply CHANGE and compare incremental values with initial values. (fn SOURCE &optional TITLE &rest CHANGE) (defalias 'phps-mode-test--incremental-vs-intial-buffer '(macro . #[641 "\300\301\302\303D\304\305\306\307  FD\310\311\312 \313\314\315\316\317\320\321\322\323\324\325\305\306\326\327BBBD\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352*\306\353-EE\257\"BBBBBBBB\207" [let ((test-buffer-incremental (generate-new-buffer "test-incremental")) (incremental-states) (incremental-tokens) (incremental-imenu) (incremental-indent) (incremental-buffer) (incremental-bookkeeping) (incremental-nest-location-stack) (test-buffer-initial (generate-new-buffer "test-initial")) (initial-states) (initial-tokens) (initial-imenu) (initial-indent) (initial-buffer) (initial-bookkeeping) (initial-nest-location-stack)) (switch-to-buffer test-buffer-incremental) insert (goto-char 0) phps-mode-debug-message message "\nTesting incremental buffer '%s':\n'%s'\n" (phps-mode) (phps-mode-debug-message (message "\nPerforming changes\n")) append (phps-mode-lex-analyzer--process-changes test-buffer-incremental) (setq incremental-states phps-mode-lex-analyzer--states) (setq incremental-tokens phps-mode-lex-analyzer--tokens) (setq incremental-imenu phps-mode-lex-analyzer--imenu) (setq incremental-indent (phps-mode-test--hash-to-list phps-mode-lex-analyzer--lines-indent)) (setq incremental-buffer (buffer-substring (point-min) (point-max))) (setq incremental-bookkeeping (phps-mode-test--hash-to-list phps-mode-lex-analyzer--bookkeeping t)) (setq incremental-nest-location-stack phps-mode-lex-analyzer--nest-location-stack) (switch-to-buffer test-buffer-initial) (insert incremental-buffer) (goto-char 0) "\nTesting initial buffer '%s':\n'%s'\n" (incremental-buffer) (phps-mode) (setq initial-states phps-mode-lex-analyzer--states) (setq initial-tokens phps-mode-lex-analyzer--tokens) (setq initial-imenu phps-mode-lex-analyzer--imenu) (setq initial-indent (phps-mode-test--hash-to-list phps-mode-lex-analyzer--lines-indent)) (setq initial-buffer (buffer-substring (point-min) (point-max))) (setq initial-bookkeeping (phps-mode-test--hash-to-list phps-mode-lex-analyzer--bookkeeping t)) (setq initial-nest-location-stack phps-mode-lex-analyzer--nest-location-stack) (phps-mode-debug-message (message "\nComparing tokens, lines indent and imenu between buffer:\n\n'%s'\n\nand:\n\n'%s'\n" initial-buffer incremental-buffer)) (should (equal initial-buffer incremental-buffer)) (should (equal initial-tokens incremental-tokens)) (should (equal initial-states incremental-states)) (should (equal initial-indent incremental-indent)) (should (equal initial-imenu incremental-imenu)) (should (equal initial-bookkeeping incremental-bookkeeping)) (should (equal initial-nest-location-stack incremental-nest-location-stack)) (kill-buffer test-buffer-incremental) (kill-buffer test-buffer-initial) when "\nPassed incremental tests for '%s'\n"] 48 (#$ . 506)])) #@89 Set up test buffer with SOURCE, TITLE and BODY. (fn SOURCE &optional TITLE &rest BODY) (defalias 'phps-mode-test--with-buffer '(macro . #[641 "\300\301\302\303D\304\305\306\307  FD\310\311\312\313\f\306\314EED\"BBBBBBB\207" [let ((test-buffer (generate-new-buffer "test"))) (switch-to-buffer test-buffer) insert (goto-char 0) phps-mode-debug-message message "\nTesting buffer '%s':\n'%s'\n" (phps-mode) append (kill-buffer test-buffer) when "\nPassed tests for '%s'\n"] 18 (#$ . 3524)])) #@148 Return a list that represent the HASH-TABLE. Each element is a list: (list key value), optionally UN-SORTED. (fn HASH-TABLE &optional UN-SORTED) (defalias 'phps-mode-test--hash-to-list #[513 "\300C\301!\205)\302\303\304\305\306\307!\310\"\311\312%\"\210\203#\211\242\237\202)\313\242\237\314\"\207" [nil hash-table-p maphash make-byte-code 514 "\300D\300\242B\240\207" vconcat vector #1=[] 5 "\n\n(fn K V)" sort #[514 "@@W\207" #1# 4 "\n\n(fn A B)"]] 10 (#$ . 4029)]) (byte-code "\301\302!\210\303\302!\210\304\305\306!\207" [phps-mode-async-process transient-mark-mode t electric-pair-mode nil provide phps-mode-test] 2)