aboutsummaryrefslogtreecommitdiffstats
path: root/test/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
* (format "%d" F) now truncates floating FPaul Eggert2018-06-251-0/+8
| | | | | | | | | | | | | Problem reported by Paul Pogonyshev (Bug#31938). * src/editfns.c: Include math.h, for trunc. (styled_format): For %d, truncate floating-point numbers and convert -0 to 0, going back to how Emacs 26 did things. * doc/lispref/strings.texi (Formatting Strings): Document behavior of %o, %d, %x, %X on floating-point numbers. * src/floatfns.c (trunc) [!HAVE_TRUNC]: Rename from emacs_trunc and make it an extern function, so that editfns.c can use it. All callers changed. * test/src/editfns-tests.el (format-%d-float): New test.
* Skip a json.c test unless functions being tested existJoão Távora2018-06-191-0/+2
| | | | | | * test/src/json-tests.el (json-parse-with-custom-null-and-false-objects): Skip this test unless functions being tested exist.
* Merge from origin/emacs-26Glenn Morris2018-06-181-0/+11
|\ | | | | | | | | | | | | | | | | | | | | | | | | 63ba73a Fix documentation of ':propertize' in mode-line-format 22aa665 Reject invalid 5-byte sequences when detecting UTF-8 encoding 0d3c358 Fix 'replace-buffer-contents' in multibyte buffers c79a627 Update etc/NEWS for mail-source-movemail-program change 63f1dc4 Improve movemail default 0b1a2ae Delete description of deleted Customize functions fcd66d0 Keep vc-print-log from putting point at buffer end (Bug#31764) Conflicts: etc/NEWS
| * Fix 'replace-buffer-contents' in multibyte buffersEli Zaretskii2018-06-151-0/+11
| | | | | | | | | | | | | | | | | | * src/editfns.c (buffer_chars_equal): Pass a byte position to BUF_FETCH_CHAR_AS_MULTIBYTE, not a character position. (Bug#31837) * test/src/editfns-tests.el (replace-buffer-contents-bug31837): New test.
| * Fix bug#30846, along with misc cleanups found along the wayStefan Monnier2018-06-031-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/src/data-tests.el (data-tests-kill-all-local-variables): New test. * src/buffer.c (swap_out_buffer_local_variables): Remove. Fuse the body of its loop into that of reset_buffer_local_variables. (Fkill_buffer, Fkill_all_local_variables): Don't call it any more. (reset_buffer_local_variables): Make sure the buffer's local binding is swapped out before removing it from the alist (bug#30846). Call watchers before actually killing the var. * src/data.c (Fmake_local_variable): Simplify. Use swap_in_global_binding to swap out any local binding, instead of a mix of find_symbol_value followed by messing with where&found. Don't call swap_in_symval_forwarding since the currently swapped binding is never one we've modified. (Fkill_local_variable): Use swap_in_global_binding rather than messing with where&found to try and trick find_symbol_value into doing the same. * src/alloc.c (mark_localized_symbol): 'where' can't be a frame any more. (cherry picked from commit 3ddff080341580eb6fc18d907181e9cc2301f62d)
| * Fix another case of freed markers in the undo-list (Bug#30931)Noam Postavsky2018-06-031-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | * src/alloc.c (free_marker): Remove. * src/editfns.c (save_restriction_restore): * src/insdel.c (signal_before_change): Detach the markers from the buffer when we're done with them instead of calling free_marker on them. * test/src/editfns-tests.el (delete-region-undo-markers-1) (delete-region-undo-markers-2): New tests. (cherry picked from commit 96b8747d5c5d747af13fd84d8fe0308ef2a0ea7a)
* | Also allow custom false and null when serializing to JSONJoão Távora2018-06-151-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/text.texi (Parsing JSON): Describe new arguments of json-serialize and json-insert. * src/json.c (enum json_object_type, struct json_configuration): Move up in file before first usage. (lisp_to_json_toplevel, lisp_to_json_toplevel_1, lisp_to_json): Accept a struct json_configuration*. (Fjson_serialize, Fjson_insert): Accept multiple args. (json_parse_args): Accept new boolean configure_object_type. * test/src/json-tests.el (json-serialize, json-insert): Update forward decls. (json-parse-with-custom-null-and-false-objects): Add assertions for json-serialize.
* | Support custom null and false objects when parsing JSONJoão Távora2018-06-151-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/text.texi (Parsing JSON): Describe new :null-object and :false-object kwargs to json-parse-string and json-parse-buffer. * src/json.c (struct json_configuration): New type. (json_to_lisp): Accept a struct json_configuration* param. (json_parse_args): Rename from json_parse_object_type. (Fjson_parse_string): Rework docstring. (Fjson_parse_string, Fjson_parse_buffer): Update call to json_to_lisp. (syms_of_json): Two new syms, QCnull_object and QCfalse_object. * test/src/json-tests.el (json-parse-with-custom-null-and-false-objects): New test.
* | Give warning if losing value to defvaralias (Bug#5950)Noam Postavsky2018-06-121-0/+22
| | | | | | | | | | | | * src/eval.c (Fdefvaralias): Call `display-warning' if the alias target has a non-eq value to the variable being aliased. * test/src/eval-tests.el (defvaralias-overwrite-warning): New test.
* | Accept plists when serializing and parsing JSONJoão Távora2018-06-071-2/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/text.texi (Parsing JSON): Mention plist support. * src/json.c (lisp_to_json_toplevel_1): Serialize plists to json. (Fjson_serialize): Mention plists in docstring. (enum json_object_type): Add json_object_plist. (json_to_lisp): Parse JSON into plists. (json_parse_object_type): Consider plists. (Fjson_parse_string): Mention plists in docstring. (syms_of_json): New Qplist sym_of_json. (lisp_to_json): Update comment. * test/src/json-tests.el (json-serialize/object) (json-parse-string/object): New plist tests.
* | Honor print-charset-text-property value of nil (Bug#31376)Noam Postavsky2018-05-231-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/print.c (print_check_string_charset_prop): Move check for nil Vprint_charset_text_property from here... (print_prune_string_charset): ... to here. (syms_of_print) <print-charset-text-property>: Clarify that any non-boolean values are treated the same as `default'. * doc/lispref/streams.texi (Output Variables): Add print-prune-string-charset. * test/src/print-tests.el (print-charset-text-property-nil) (print-charset-text-property-default) (print-charset-text-property-t): New tests. (print-tests--prints-with-charset-p): New helper function.
* | Fix failed assertion when load-force-doc-stringsPaul Eggert2018-05-221-0/+4
| | | | | | | | | | | | | | Problem reported by Philipp Stephani (Bug#31556). * src/lread.c (read_vector): When load_force_doc_strings, check for byte code vectors that are invalid because they are too short. * test/src/lread-tests.el (lread-invalid-bytecodes): New test.
* | Don’t assume ordering in make-process/mix-stderrPaul Eggert2018-05-211-1/+14
| | | | | | | | | | | | | | * test/src/process-tests.el (process-tests--mixable): New function. (make-process/mix-stderr): Don’t assume stdout is merged before stderr. POSIX does not require this, and the assumption failed to hold on my Fedora 28 platform. See Bug#31214.
* | Merge from origin/emacs-26Glenn Morris2018-05-071-24/+24
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | 1d732d6 (origin/emacs-26) Fix gud-statement for pdb 91a68b5 ; * msdos/INSTALL: Add info about GCC versions. 7ddcc9a Document 'custom-group' 58f9e15 A minor addition to etc/DEBUG 4590414 Avoid errors in ispell.el when Enchant returns empty extra chars d0d75f9 Make 'ispell-initialize-spellchecker-hook' work again b90ce66 Handle selected_window change in prepare_menu_bars (Bug#31312) 79ad0b3 ; * INSTALL: Fix Emacs version number. (Bug#31358) 91de88b Fix report-emacs-bug via mailclient on MS-Windows f4b5ff2 Port collation tests to glibc 2.27
| * Port collation tests to glibc 2.27Paul Eggert2018-05-021-24/+24
| | | | | | | | | | | | | | * test/src/fns-tests.el (fns-tests-collate-strings) (fns-tests-collate-sort): Don’t make unportable assumptions about how en_US.UTF-8 collation works. These assumptions are not true on Fedora 28, which ships with glibc 2.27.
* | Fix off-by-one history pruning (bug#31211)Basil L. Contovounesios2018-05-021-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/subr.el (add-to-history): Clarify docstring. Protect against negative history-length and unnecessary variable modification, as per read_minibuf. * lisp/ido.el (ido-record-command): * lisp/international/mule-cmds.el (deactivate-input-method): (set-language-environment-input-method): * lisp/isearch.el (isearch-done): * lisp/minibuffer.el (read-file-name-default): * lisp/net/eww.el (eww-save-history): * lisp/simple.el (edit-and-eval-command, repeat-complex-command): (command-execute, kill-new, push-mark): * src/callint.c (Fcall_interactively): * src/minibuf.c (read_minibuf): Delegate to add-to-history. * test/lisp/simple-tests.el (command-execute-prune-command-history): * test/src/callint-tests.el (call-interactively-prune-command-history): New tests.
* | * test/src/process-tests.el (make-process/mix-stderr): Skip on hydra.Glenn Morris2018-04-301-0/+3
| |
* | * lisp/subr.el (dotimes): Deprecate RESULT field. (Bug#16206)Juri Linkov2018-04-281-2/+3
| | | | | | | | | | | | | | | | | | * doc/lispref/control.texi (Iteration): * doc/misc/cl.texi (Iteration): Document deprecation of its use. * doc/lispintro/emacs-lisp-intro.texi (dotimes): * test/src/emacs-module-tests.el (multiply-string): * test/lisp/filenotify-tests.el (file-notify-test07-many-events): Place RESULT field after the form.
* | Fix documentation and tests for 'string-distance'Eli Zaretskii2018-04-281-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | * src/fns.c (Fstring_distance): Doc fix. * doc/lispref/strings.texi (Text Comparison): Document 'string-distance'. * etc/NEWS: Fix wording and mark as documented in the manuals. * test/src/fns-tests.el (test-string-distance): Move from subr-tests.el and rename.
* | Merge from origin/emacs-26Glenn Morris2018-04-201-0/+8
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5de608f (origin/emacs-26) Update the documentation of 'perform-replace' 06245b6 * etc/NEWS: Another fix for the last change (noted by Juri Li... 8f6293c Fix use of @key in Texinfo manuals f4c9894 Improve documentation of actual arglist ce0e253 ; * etc/NEWS: Improve last change as proposed by Phil Sainty b89ff0e Don't assume term-current-row cache is valid (Bug#31193) 326a296 ; * etc/NEWS: Mention 'display-buffer-in-major-side-window' c... 3bdc9a1 Fix flyspell-auto-correct-previous-word broken by recent change a539eb5 * test/src/lread-tests.el (lread-test-bug-31186): New test. 3fa472b Fix undefined behaviour while looking for lexical-binding fil... 4341aac Minor wording improvement in "Bookmarks" Conflicts: test/src/lread-tests.el
| * * test/src/lread-tests.el (lread-test-bug-31186): New test.Eli Zaretskii2018-04-171-0/+8
| |
* | * test/src/process-tests.el (make-process/mix-stderr): Use bash.Glenn Morris2018-04-181-3/+3
| | | | | | | | Not all shells support ">&2".
* | Fix signal for large integers with valid syntaxPaul Eggert2018-04-171-0/+5
| | | | | | | | | | | | * src/lread.c (read_integer): If a radixed integer has valid syntax but is waayyy too large, signal overflow instead of invalid syntax. * test/src/lread-tests.el (lread-long-hex-integer): New test.
* | Avoid undefined behavior in 'defvar' (Bug#31072)Philipp Stephani2018-04-151-0/+4
| | | | | | | | | | * src/eval.c (Fdefvar): Check that first argument is a symbol. * test/src/eval-tests.el (defvar/bug31072): New unit test.
* | Add tests for buffer-base-buffer function (Bug#30905)Shanavas M2018-04-111-0/+10
| | | | | | | | | | | | * test/src/buffer-tests.el (test-buffer-base-buffer-indirect) (test-buffer-base-buffer-non-indirect): New tests for `buffer-base-buffer'.
* | Document that 'make-process' mixes the output streamsPhilipp Stephani2018-04-071-0/+18
| | | | | | | | | | | | | | | | * doc/lispref/processes.texi (Asynchronous Processes): * src/process.c (Fmake_process): Document that standard error is mixed with standard output if STDERR is nil. * test/src/process-tests.el (make-process/mix-stderr): New unit test.
* | Fix another case of freed markers in the undo-list (Bug#30931)Noam Postavsky2018-03-301-0/+51
| | | | | | | | | | | | | | | | | | | | * src/alloc.c (free_marker): Remove. * src/editfns.c (save_restriction_restore): * src/insdel.c (signal_before_change): Detach the markers from the buffer when we're done with them instead of calling free_marker on them. * test/src/editfns-tests.el (delete-region-undo-markers-1) (delete-region-undo-markers-2): New tests.
* | Lisp reader now checks for integer overflowPaul Eggert2018-03-291-4/+18
| | | | | | | | | | | | | | | | | | | | | | * doc/lispref/numbers.texi (Integer Basics), etc/NEWS: Document this. * src/lisp.h (S2N_IGNORE_TRAILING, S2N_OVERFLOW_TO_FLOAT): New constants. * src/lread.c (string_to_number): Change trailing bool arg to integer argument with flags, to support S2N_OVERFLOW_TO_FLOAT. All uses changed. * test/src/editfns-tests.el (read-large-integer): New test.
* | Allow `&rest' or `&optional' without following variable (Bug#29165)Noam Postavsky2018-03-251-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is sometimes convenient when writing macros, so that the empty variable case doesn't need to be handled specially. Older versions of Emacs accepted this in some cases (especially the interpreter in Emacs 25 and below was very accepting). | interpreted/compiled | | arglist | 25 & earlier | 26 | 27 | |---------------------------+--------------+-----+-----| | (&rest) | y/n | n/n | y/y | | (&rest &rest) | y/n | n/n | n/n | | (&rest &rest x) | y/n | n/n | n/n | | (&rest x &rest) | y/n | n/n | n/n | | (&rest x &rest y) | y/n | n/n | n/n | |---------------------------+--------------+-----+-----| | (&optional) | y/n | n/n | y/y | | (&optional &optional) | y/n | n/n | n/n | | (&optional x &optional) | y/n | n/n | n/n | | (&optional x &optional y) | y/y | n/n | n/n | |---------------------------+--------------+-----+-----| | (&optional &rest) | y/n | n/n | y/y | | (&optional x &rest) | y/n | n/n | y/y | | (&optional &rest y) | y/y | n/n | y/y | |---------------------------+--------------+-----+-----| | (&rest &optional) | y/n | n/n | n/n | | (&rest &optional y) | y/n | n/n | n/n | | (&rest x &optional y) | y/n | n/n | n/n | The values in the table above can be produced with the following code: (with-current-buffer (get-buffer-create "*ck-args*") (erase-buffer) (dolist (arglist '((&rest) (&rest &rest) (&rest &rest x) (&rest x &rest) (&rest x &rest y) (&optional) (&optional &optional) (&optional x &optional) (&optional x &optional y) (&optional &rest) (&optional x &rest) (&optional &rest y) (&rest &optional) (&rest &optional y) (&rest x &optional y))) (insert (format "%c/%c\n" (condition-case err (progn (funcall `(lambda ,arglist 'ok)) ?y) (error ?n)) (condition-case err (progn (byte-compile-check-lambda-list arglist) ?y) (error ?n)))) (display-buffer (current-buffer)))) * src/eval.c (funcall_lambda): * lisp/emacs-lisp/bytecomp.el (byte-compile-check-lambda-list): Don't check for missing variables after `&rest' and `&optional'. * test/src/eval-tests.el (eval-tests--bugs-24912-and-24913) (eval-tests-accept-empty-optional-rest): Update tests accordingly. * etc/NEWS: Update announcement accordingly. * doc/lispref/functions.texi (Argument List): Update manual to indicate that variable names are optional.
* | Fix bug#30846, along with misc cleanups found along the wayStefan Monnier2018-03-231-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/src/data-tests.el (data-tests-kill-all-local-variables): New test. * src/buffer.c (swap_out_buffer_local_variables): Remove. Fuse the body of its loop into that of reset_buffer_local_variables. (Fkill_buffer, Fkill_all_local_variables): Don't call it any more. (reset_buffer_local_variables): Make sure the buffer's local binding is swapped out before removing it from the alist (bug#30846). Call watchers before actually killing the var. * src/data.c (Fmake_local_variable): Simplify. Use swap_in_global_binding to swap out any local binding, instead of a mix of find_symbol_value followed by messing with where&found. Don't call swap_in_symval_forwarding since the currently swapped binding is never one we've modified. (Fkill_local_variable): Use swap_in_global_binding rather than messing with where&found to try and trick find_symbol_value into doing the same. * src/alloc.c (mark_localized_symbol): 'where' can't be a frame any more.
* | Port emacs-module-tests to 32-bit EmacsPaul Eggert2018-03-221-1/+1
| | | | | | | | | | | | | | | | | | Fix a portability bug when emacs-module-tests.el is byte-compiled with a 32-bit Emacs (where #x20000000 evaluates to a floating-point number) and then is run on a 64-bit Emacs (where the floating-point number causes a test failure). * test/src/emacs-module-tests.el (mod-test-sum-test): Don’t assume #x20000000 can be represented as an Emacs integer.
* | Port data-tests-popcnt to 32-bit EmacsPaul Eggert2018-03-211-3/+3
| | | | | | | | | | | | | | * test/src/data-tests.el (data-tests-popcnt): Don’t assume Emacs integers can represent 32-bit quantities. Change to a simple and straightforward approach, since runtime performance is not important here.
* | Add tests for Bug#30408Paul Eggert2018-03-211-0/+21
| | | | | | | | | | * test/src/editfns-tests.el (format-%d-large-float) (format-%x-large-float, format-%o-invalid-float): New tests.
* | Quieten --without-json compilation of json-tests.elGlenn Morris2018-03-091-0/+5
| | | | | | | | | | * test/src/json-tests.el (json-serialize, json-insert) (json-parse-string, json-parse-buffer): Declare.
* | Merge from origin/emacs-26Glenn Morris2018-02-171-0/+20
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | e5a2933 (origin/emacs-26) lisp/vc/: documentation fixes f21f8e6 Document 'desktop-files-not-to-save' d8917eb Improve documentation of Profiling features b228839 Improve indexing of "performance" in ELisp manual ab67b3e Minor change in Emacs manual's VC chapter c352434 Avoid memory corruption with specpdl overflow + edebug (Bug#3... 593bbda Document comment-fill-column in the manual (Bug#11636) bd4cc8d * doc/emacs/dired.texi (Marks vs Flags): Copyedits. 69107f3 ; Fix doc typos related to indefinite articles aaad1e6 Merge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/emac... 5906418 More fixes for the Emacs manual 9ab3df1 ; Fix doc typos related to indefinite articles 66a4e65 ; Fix doc typos related to indefinite articles 35e5c57 ; Fix doc typos related to indefinite articles
| * Avoid memory corruption with specpdl overflow + edebug (Bug#30481)Noam Postavsky2018-02-161-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | If grow_specpdl fails due to outgrowing max_specpdl_size, it will signal an error *before* growing the specpdl array. Therefore, when handling the signal, specpdl_ptr points past the end of the specpdl array and any further use of of specpdl before unwinding (e.g., if edebug binds signal-hook-function) will cause memory corruption. * src/eval.c (signal_or_quit): Don't call `signal-hook-function' if the specpdl_ptr is already past the end of the specpdl array. * test/src/eval-tests.el (eval-tests--exceed-specbind-limit) (eval-exceed-specbind-with-signal-hook): New test & helper function.
| * Revert "Signal error for symbol names with strange quotes (Bug#2967)"Noam Postavsky2018-01-281-17/+0
| | | | | | | | | | | | | | | | | | | | That commit did not make the corresponding change to printing, thus breaking the (eq (read (prin1-to-string SYM)) SYM) invariant for those symbols. It's too late in the release cycle to change printing behavior, therefore revert the reader change. Don't merge to master, the print function will be updated there (see "Fix round tripping of read->print for symbols with strange quotes").
* | Add tests to verify error propagation in 'json-insert'.Philipp Stephani2018-02-031-0/+32
| | | | | | | | | | * test/src/json-tests.el (json-tests--error): New error symbol. (json-insert/signal, json-insert/throw): New tests.
* | Properly integrate modules into the loading process (Bug#30164).Philipp Stephani2018-02-021-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | * src/lread.c (Fload): Don't defer to module-load immediately when encountering a module, but use the normal loading machinery to properly set up load-history, check for recursive loads, print messages, etc. * test/src/emacs-module-tests.el (module/load-history): New test. (module/describe-function-1): Adapt test. * etc/NEWS: Mention fixed behavior.
* | Use 'defalias' in test module instead of 'fset'.Philipp Stephani2018-02-021-2/+3
| | | | | | | | | | | | | | | | | | | | This puts functions defined in the module into the 'load-history'. * test/data/emacs-module/mod-test.c (bind_function): Use 'defalias' instead of 'fset'. * test/src/emacs-module-tests.el (module/describe-function-1): Adapt unit test.
* | Add support for module functions to C-h f (Bug#30163).Philipp Stephani2018-02-021-0/+14
| | | | | | | | | | | | | | | | * lisp/help-fns.el (help-fns-function-description-header): Handle module functions. * test/src/emacs-module-tests.el (module/describe-function-1): New test.
* | Add missing module types to cl--typeof-types.Philipp Stephani2018-01-281-0/+10
| | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/cl-preloaded.el (cl--typeof-types): Add module types. * test/src/emacs-module-tests.el (emacs-module-tests--generic): New helper function. (module-function-object, mod-test-userptr-fun-test): Test that type dispatching works with module types.
* | Test that module functions are functions.Philipp Stephani2018-01-281-0/+1
| | | | | | | | | | * test/src/emacs-module-tests.el (module-function-object): Verify that a module function is treated as a function.
* | Fix round tripping of read->print for symbols with strange quotesNoam Postavsky2018-01-281-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since 2017-07-22 "Signal error for symbol names with strange quotes (Bug#2967)", symbol names beginning with certain quote characters require an escaping backslash. However, the corresponding change for printing missed, so that (eq (read (prin1-to-string SYM)) SYM) does not give `t' for such symbols. * src/character.c (confusable_symbol_character_p): New function, extracted from test `read1'. * src/lread.c (read1): Use it. * src/print.c (print_object): Use it to print a backslash for symbols starting with characters that `read1' requires to be escaped. * test/src/print-tests.el (print-read-roundtrip): New test. * etc/NEWS.26: * etc/NEWS: Clarify the announcement for the earlier reader change (Bug#30217).
* | Raise limit of regexp repetition (Bug#24914)Noam Postavsky2018-01-261-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/regex.h (RE_DUP_MAX): Raise limit to 2^16-1. * etc/NEWS: Announce it. * doc/lispref/searching.texi (Regexp Backslash): Document it. * test/src/regex-tests.el (regex-repeat-limit): Test it. * src/regex.h (reg_errcode_t): Add REG_ESIZEBR code. * src/regex.c (re_error_msgid): Add corresponding entry. (GET_INTERVAL_COUNT): Return it instead of the more generic REG_EBADBR when encountering a repetition greater than RE_DUP_MAX. * lisp/isearch.el (isearch-search): Don't convert errors starting with "Invalid" into "incomplete". Such errors are not incomplete, in the sense that they cannot be corrected by appending more characters to the end of the regexp. The affected error messages are: - REG_BADPAT "Invalid regular expression" - \\(?X:\\) where X is not a legal group number - \\_X where X is not < or > - REG_ECOLLATE "Invalid collation character" - There is no code to throw this. - REG_ECTYPE "Invalid character class name" - [[:foo:] where foo is not a valid class name - REG_ESUBREG "Invalid back reference" - \N where N is referenced before matching group N - REG_BADBR "Invalid content of \\{\\}" - \\{N,M\\} where N < 0, M < N, M or N larger than max - \\{NX where X is not a digit or backslash - \\{N\\X where X is not a } - REG_ERANGE "Invalid range end" - There is no code to throw this. - REG_BADRPT "Invalid preceding regular expression" - We never throw this. It would usually indicate a "*" with no preceding regexp text, but Emacs allows that to match a literal "*".
* | Fix emacs-module-tests to work out of build treeAndy Moreton2018-01-261-2/+1
| | | | | | | | | | | | | | | | | | * test/Makefile.in (test_module_dir): Build the test module library in a subdirectory of the build directory (not the source tree). (MODULE_CFLAGS): Fix location of emacs-module.h header file. (test_module): Move built library out of the source tree. * test/src/emacs-module-tests.el (mod-test-file): Locate the test module library relative to the running Emacs executable.
* | Add unit test for Bug#30005.Philipp Stephani2018-01-231-0/+8
| | | | | | | | | | * test/src/callint-tests.el (call-interactively/embedded-nulls): New unit test.
* | Add a regression test for Bug#30004.Philipp Stephani2018-01-221-0/+38
| | | | | | | | | | * test/src/callint-tests.el (call-interactively/incomplete-multibyte-sequence): New unit test.
* | Merge from origin/emacs-26Glenn Morris2018-01-181-24/+52
|\ \ | |/ | | | | | | | | 779b2ac Use recommended long options syntax in man page c433e87 An overdue update of GNUstep emacs.tiff 188a9d9 Add some test skip conditions
| * Add some test skip conditionsGlenn Morris2018-01-171-24/+52
| | | | | | | | | | | | * test/lisp/vc/vc-bzr-tests.el (vc-bzr-test-bug9726) (vc-bzr-test-bug9781): Skip if bzr is faulty. * test/src/thread-tests.el: Skip if not compiled with threads.