summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* * tests/automated/tildify-tests.el (tildify-test--test): Optimise theMichal Nazarewicz2014-06-052-5/+9
| | | | | test slightly by reusing the same temporary buffer across multiple test cases.
* tildify.el: Rewrite `tildify-region' and co., add foreach function.Michal Nazarewicz2014-06-052-9/+14
| | | | | | | | | | | | | | | | | | | | | | | | | * lisp/textmodes/tildify.el (tildify-foreach-region-outside-env): New function which calls a callback on portions of the buffer that are outside of ignored environments. (tildify-build-regexp): Remove function since it is now incorporated in `tildify-foreach-region-outside-env' where it is optimised and simplified by the use of `mapconcat'. (tildify-tildify): Return number of substitutions made so that… (tildify-count): …can be removed. (tildify-find-env): Accept a new PAIRS argument which was previously looked up in `tildify-ignored-environments-alist' each time the function was called. With this change, the lookup is performed only once in `tildify-foreach-region-outside-env'. (tildify-region): Greatly simplify the function since now most of the work is done by `tildify-foreach-region-outside-env'. (tildify-mode-alist): Simplify slightly by avoiding if and setq and instead using or. * tests/automated/tildify-tests.el (tildify-test-find-env-end-re-bug) (tildify-test-find-env-group-index-bug): Update to support new signature of the `tildify-foreach-region-outside-env' function. Namely, it now takes pairs as an argument instead of looking it up in `tildify-ignored-environments-alist'.
* tildify.el: Better support for XMLMichal Nazarewicz2014-06-052-3/+17
| | | | | | | | | | | | | | | | | | | | | * lisp/textmodes/tildify.el (tildify-string-alist) (tildify-ignored-environments-alist): Add `nxml-mode' to the list of supported modes since `xml-mode' is no longer a thing but just an alias to the former. Also include comments and insides of tags in `tildify-ignored-environments-alist' for XML modes. Finally, since XML does not define “&nbsp;”[1], use a numeric reference for a no-break space (namely “&#160;”) [1] XML specification defines only a handful of predefined entities. The list is at <http://www.w3.org/TR/REC-xml/#sec-predefined-ent> and includes only &lt;, &gt;, &amp;, &apos; and &quot; (meaning <, >, &, ' and " respectively). This is in contrast to HTML and even XHTML which defined a whole bunch of entities including “&nbsp;”. * automated/tildify-tests.el (tildify-test--example-html): Add support for generating XML code, so that… (tildify-test-xml) …test can be added to check handling of XML documents.
* tildify.el: Fix matched group indexes in end-regex buildingMichal Nazarewicz2014-06-052-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/textmodes/tildifi.el (tildify-find-env): When looking for a start of an ignore-environment, the regex is built by concatenating regexes of all the environments configured in `tildify-ignored-environments-alist'. So for example, the following list could be used to match TeX's \verb and \verb* commands: (("\\\\verb\\(.\\)" . (1)) ("\\\\verb\\*\\(.\\)" . (1))) This would result in the following regex being used to find the start of any of the variants of the \verb command: \\\\verb\\(.\\)\\|\\\\verb\\*\\(.\\) But now, if “\\\\verb\\*\\(.\\)” matches, the first capture group won't match anything, and thus (match-string 1) will be nil, which will cause building of the end-matching regex to fail. Fix this by using capture groups from the time when the opening regexes are matched individually. * tests/automated/tildify-tests.el (tildify-test-find-env-group-index-bug): New test validating fix to the above bug.
* tildify.el: Fix end-regex building in `tildify-find-env'Michal Nazarewicz2014-06-052-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/textmodes/tildify.el (tildify-find-env): The `tildify-ignored-environments-alist' allows the end-regex to be provided not as a static string but mix of strings and indexes of groups matched the begin-regex. For example, the “\verb!…!” TeX-command (where “!” is an arbitrary character) is handled using: ("\\\\verb\\*?\\(.\\)" . (1)) In the same way, the following should be supported as well: ("open-\\(.\\)" . ("end-" 1)) However the tildify-find-env function fails at (concat result (if (stringp (setq aux (car expression))) expression ; BUG: expression is a list (regexp-quote (match-string aux)))) where the string part is handled incorrectly. The most trivial fix would be to replace `expression' in the true-part of the if-statement with `aux', but instead, this commit optimises `tildify-find-env' by changing it to use `mapconcat' rather than open-coded while-loop. * tests/automated/tildify-tests.el (tildify-test-find-env-end-re-bug): New test validating fix to the above bug.
* * test/automated/tramp-tests.el (tramp-test29-vc-registered):Michael Albinus2014-06-022-8/+2
| | | | Remove instrumentation.
* * test/automated/tramp-tests.el (tramp-remote-process-environment): Declare.Michael Albinus2014-06-022-0/+15
| | | | (tramp-test29-vc-registered): Set $BZR_HOME.
* * tramp-tests.el (tramp-test29-vc-registered):Michael Albinus2014-06-011-1/+6
| | | | Add more instrumentation code.
* * automated/tramp-tests.el (tramp-test29-vc-registered):Michael Albinus2014-06-012-1/+7
| | | | Instrument failed test case.
* * test/automated/ruby-mode-test.el (ruby-assert-face): Fix typo in previousGlenn Morris2014-05-281-1/+1
|
* * lisp/font-lock.el (font-lock-flush, font-lock-ensure): New functions.Stefan Monnier2014-05-282-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (font-lock-fontify-buffer): Mark interactive-only. (font-lock-multiline, font-lock-fontified, font-lock-set-defaults): Make buffer-local. (font-lock-specified-p): Remove redundant boundp check. (font-lock-flush-function, font-lock-ensure-function): New vars. (font-lock-turn-on-thing-lock): Set them. (font-lock-default-fontify-buffer): Obey font-lock-dont-widen. (font-lock-after-change-function): Make `old-len' optional. (font-lock-set-defaults): Remove redundant `set' of font-lock-defaults. Call font-lock-flush, just in case. * lisp/progmodes/verilog-mode.el (verilog-preprocess): Disable workaround in recent Emacsen. * lisp/progmodes/vera-mode.el (vera-fontify-buffer): Declare obsolete. (vera-mode-map, vera-mode-menu): Remove bindings to it. * lisp/progmodes/idlw-help.el (idlwave-help-fontify): Use font-lock-ensure and with-syntax-table. * lisp/textmodes/conf-mode.el (conf-quote-normal): * lisp/progmodes/sh-script.el (sh-set-shell): * lisp/progmodes/prog-mode.el (prettify-symbols-mode): * lisp/progmodes/f90.el (f90-font-lock-n): * lisp/progmodes/cwarn.el (cwarn-mode): * lisp/nxml/nxml-mode.el (nxml-toggle-char-ref-extra-display): * lisp/progmodes/compile.el (compilation-setup, compilation--unsetup): * lisp/hi-lock.el (hi-lock-mode, hi-lock-unface-buffer) (hi-lock-set-pattern, hi-lock-set-file-patterns): Use font-lock-flush. * lisp/mail/rmail.el (rmail-variables): Set font-lock-dont-widen instead of font-lock-fontify-buffer-function and font-lock-unfontify-buffer-function. (rmail-unfontify-buffer-function, rmail-fontify-message): Use with-silent-modifications. * lisp/htmlfontify.el (hfy-force-fontification): Use jit-lock-fontify-now and font-lock-ensure. * lisp/bs.el (bs-show-in-buffer): Use font-lock-ensure. * lisp/gnus/mm-view.el (mm-display-inline-fontify): Use font-lock-ensure. * lisp/gnus/gnus-cite.el (gnus-message-citation-mode): Use font-lock-flush. * lisp/org/org-compat.el (org-font-lock-ensure): New function. * lisp/org/ox-odt.el (org-odt-do-format-code): * lisp/org/ox-html.el (org-html-fontify-code): * lisp/org/org.el (org-fontify-like-in-org-mode): * lisp/org/org-src.el (org-src-font-lock-fontify-block): * lisp/org/org-clock.el (org-clock-get-clocktable): Use it. * lisp/org/ox-org.el (org-org-publish-to-org): Use it. Avoid using find-file from Elisp. * test/automated/ruby-mode-tests.el (ruby-assert-face): Use font-lock-ensure. (ruby-interpolation-keeps-non-quote-syntax): Use syntax-propertize.
* * test/automated/tildify-tests.el: New file.Michal Nazarewicz2014-05-272-0/+110
| | | | | | | * lisp/textmodes/tildify.el (tildify-buffer, tildify-region): Add dont-ask option. Fixes: debbugs:17547
* * test/indent/ps-mode.ps: New file.Stefan Monnier2014-05-275-0/+46
| | | | | | | * test/automated/core-elisp-tests.el (core-elisp-test-window-configurations): New test. * test/indent/octave.m: Add a few more tests. * test/indent/ruby.rb: Add one more test.
* * package-test.el (package-test-install-single): Update for changed output.Glenn Morris2014-05-262-1/+7
|
* Merge from emacs-24; up to 2014-05-26T10:21:18Z!rgm@gnu.orgGlenn Morris2014-05-251-0/+1
|\
| * * lisp/emacs-lisp/nadvice.el (advice--member-p): Change second arg.Stefan Monnier2014-05-231-0/+1
| | | | | | | | | | | | | | (advice-function-member-p): Tell it to check both names and functions. (advice--add-function): Adjust call accordingly. Fixes: debbugs:17531
* | Tweak previous bytecomp-tests.el changeGlenn Morris2014-05-212-3/+4
| | | | | | | | | | * test/automated/bytecomp-tests.el (test-byte-comp-compile-and-load): Fix handling of temporary elc files.
* | Remove some stray test tempfilesGlenn Morris2014-05-212-1/+4
| | | | | | | | | | * test/automated/bytecomp-tests.el (test-byte-comp-compile-and-load): Avoid leaving empty .elc tempfiles behind.
* | * fns-tests.el (fns-tests-nreverse): Update for changed string behavior.Glenn Morris2014-05-212-1/+6
| |
* | * src/fns.c (Fnreverse): Allow vectors and bool vectors.Dmitry Antipov2014-05-152-0/+34
| | | | | | | | | | | | | | | | * doc/lispref/lists.texi (Building Cons Cells and Lists): Remove description of `nreverse' and generalize it... * doc/lispref/sequences.texi (Sequences): ...for sequences here. * tests/automated/fns-tests.el (fns-tests-nreverse) (fns-tests-nreverse-bool-vector): New tests.
* | * tests/automated/fns-tests.el: New file.Dmitry Antipov2014-05-152-0/+43
| |
* | Merge from emacs-24; up to 2014-05-12T06:15:47Z!rgm@gnu.orgGlenn Morris2014-05-114-7/+45
|\ \ | |/
| * * lisp/emacs-lisp/nadvice.el: Support adding a given function multiple times.Stefan Monnier2014-05-103-1/+38
| | | | | | | | | | | | | | | | | | (advice--member-p): If name is given, only compare the name. (advice--remove-function): Don't stop at the first match. (advice--normalize-place): New function. (add-function, remove-function): Use it. (advice--add-function): Pass the name, if any, to advice--remove-function.
| * * test/automated/vc-bzr.el: Tweak previous to use BZR_HOME rather than HOMEGlenn Morris2014-05-081-7/+8
| |
| * Fix comment typo in previousGlenn Morris2014-05-081-1/+1
| |
* | Merge from emacs-24; up to 2014-05-08T06:58:46Z!rgm@gnu.orgGlenn Morris2014-05-082-20/+36
|\ \ | |/
| * test/automated/vc-bzr.el: revise previous changeGlenn Morris2014-05-072-20/+36
| | | | | | | | | | | | | | * test/automated/vc-bzr.el (vc-bzr-test-bug9726, vc-bzr-test-bug9781) (vc-bzr-test-faulty-bzr-autoloads): Give bzr a temporary home-directory, in case the real one is missing. Simply disabling logging wasn't enough.
* | Merge from emacs-24; up to 2014-05-08T03:34:20Z!rgm@gnu.orgGlenn Morris2014-05-074-3/+64
|\ \ | |/
| * test/automated/vc-bzr.el: disable bzr's loggingGlenn Morris2014-05-072-3/+14
| | | | | | | | | | | | | | | | This is for systems like hydra, where HOME can be read-only/absent. See e.g. <http://hydra.nixos.org/build/10870893>. * test/automated/vc-bzr.el (vc-bzr-test-bug9726, vc-bzr-test-bug9781) (vc-bzr-test-faulty-bzr-autoloads): Disable bzr logging.
| * * lisp/progmodes/ruby-mode.el (ruby-syntax-propertize-function):Dmitry Gutov2014-05-062-0/+9
| | | | | | | | | | | | | | | | | | Backtrack one char if the global/char-literal var matcher hits inside a string. The next char could be the beginning of an expression expansion. * test/automated/ruby-mode-tests.el (ruby-interpolation-after-dollar-sign): New test.
| * * lisp/help-fns.el (describe-function-1): Test for an autoload before a macroGlenn Morris2014-05-052-0/+41
| | | | | | | | | | | | | | | | since `macrop' works on autoloads. * test/automated/help-fns.el: New file. Fixes: debbugs:17410
* | Fix ChangeLogs of 2014-05-01 commit.Barry O'Reilly2014-05-031-6/+4
| |
* | Change algorithm used to adjust positions for undo in regionBarry O'Reilly2014-05-012-2/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * simple.el (undo-make-selective-list): New algorithm fixes incorrectness of position adjustments when undoing in region. (Bug#17235) (undo-elt-crosses-region): Make obsolete. (undo-adjust-elt, undo-adjust-beg-end, undo-adjust-pos): New functions to adjust positions using undo-deltas. * automated/undo-tests.el (undo-test-region-deletion): New test to demonstrate bug#17235. (undo-test-region-example): New test to verify example given in comments for undo-make-selective-list. Fixes: debbugs:17325
* | * lisp/progmodes/perl-mode.el (perl--syntax-exp-intro-regexp): New var.Stefan Monnier2014-04-251-1/+5
| | | | | | | | | | (perl-syntax-propertize-function): Use it. Extend handling of here-docs to the unquoted case.
* | Merge from emacs-24; up to 2014-04-25T10:35:01Z!michael.albinus@gmx.deJuanma Barranquero2014-04-254-31/+61
|\ \ | |/
| * * automated/tramp-tests.el (top):Michael Albinus2014-04-253-19/+11
| | | | | | | | | | | | * automated/file-notify-tests.el (top): Do not disable interactive passwords in batch mode. (password-cache-expiry): Set to nil.
| * Use a mock-up connection method for remote files.Michael Albinus2014-04-243-14/+52
| | | | | | | | | | | | | | | | | | * automated/file-notify-tests.el (file-notify-test-remote-temporary-file-directory): * automated/tramp-tests.el (tramp-test-temporary-file-directory): Use a mock-up method as default. (tramp-test00-availability): Print the used directory name. (tramp-test33-recursive-load): Fix typo.
| * * lisp/progmodes/perl-mode.el (perl-syntax-propertize-function): Slash afterStefan Monnier2014-04-221-0/+2
| | | | | | | | | | | | &, |, +, - and * can't be a division. Fixes: debbugs:17317
* | Merge from emacs-24; up to 2014-04-22T20:19:17Z!eggert@cs.ucla.eduPaul Eggert2014-04-223-19/+43
|\ \ | |/
| * * automated/tramp-tests.el (tramp--test-check-files): Remove traces.Michael Albinus2014-04-222-4/+3
| |
| * * automated/tramp-tests.el (tramp-test30-special-characters):Michael Albinus2014-04-222-3/+8
| | | | | | | | Remove test for backslash.
| * * lisp/emacs-lisp/cl-macs.el (cl--loop-let): Avoid `nil' as var name.Stefan Monnier2014-04-211-0/+3
| |
| * * automated/tramp-tests.el (tramp-test19-directory-files-and-attributes)Michael Albinus2014-04-202-16/+32
| | | | | | | | | | | | (tramp-test22-file-times): Check for `file-attributes' equality only if there is a usable timestamp. (tramp--test-check-files): Do not use `copy-sequence'.
| * Instrument `tramp--test-check-files' in order to get traces on hydra.Michael Albinus2014-04-191-1/+2
| |
* | Correctly macroexpand top-level forms during eager macroexpandDaniel Colascione2014-04-222-10/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/byte-run.el (eval-when-compile, eval-and-compile): Improve docstrings. * lisp/emacs-lisp/macroexp.el (internal-macroexpand-for-load): Add `full-p' parameter; when nil, call `macroexpand' instead of `macroexpand-all'. * src/lread.c (readevalloop_eager_expand_eval): New function that can recurse into toplevel forms. (readevalloop): Call it. * src/lisp.h: Declare Qprogn. * src/callint.c (Qprogn): No longer static. * test/automated/bytecomp-tests.el (test-byte-comp-compile-and-load): Add compile flag. (test-byte-comp-macro-expansion) (test-byte-comp-macro-expansion-eval-and-compile) (test-byte-comp-macro-expansion-eval-when-compile) (test-byte-comp-macro-expand-lexical-override): Use it. (test-eager-load-macro-expansion) (test-eager-load-macro-expansion-eval-and-compile) (test-eager-load-macro-expansion-eval-when-compile) (test-eager-load-macro-expand-lexical-override): New tests.
* | Fix cl-lib-struct-accessors test again.Daniel Colascione2014-04-211-1/+1
| | | | | | | | | | | | * test/automated/cl-lib.el (cl-lib-struct-accessors): Fix test to account for removal of `cl-struct-set-slot-value'. Also, move the defstruct to top level.
* | Optimize cl-struct-slot-value; fix testDaniel Colascione2014-04-212-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 2014-04-22 Daniel Colascione <dancol@dancol.org> * emacs-lisp/cl-macs.el (cl-struct-sequence-type,cl-struct-slot-info): Declare pure. (cl-struct-slot-value): Conditionally use aref or nth so that the compiler produces optimal code. 2014-04-22 Daniel Colascione <dancol@dancol.org> * automated/cl-lib.el (cl-lib-struct-accessors): Fix test to account for removal of `cl-struct-set-slot-value'.
* | Correctly treat progn contents as toplevel forms when byte compilingDaniel Colascione2014-04-212-0/+57
| |
* | Fix cl-the testDaniel Colascione2014-04-202-5/+6
| |
* | Fix cl-loop destructuring under `with' clauseDaniel Colascione2014-04-202-0/+7
| |