1. 12 Jun, 2017 9 commits
    • Glenn Morris's avatar
      Clean up after module assertion tests · ab2116c9
      Glenn Morris authored
      * test/src/emacs-module-tests.el (module--test-assertions):
      Use a temporary directory to contain any core dumps.
      ab2116c9
    • Glenn Morris's avatar
      Small improvement for module assertion test · 1612d3dd
      Glenn Morris authored
      * test/src/emacs-module-tests.el (module--test-assertions):
      Don't rely on the precise form of an "Abort" message.
      1612d3dd
    • Glenn Morris's avatar
      Improve previous test/data/emacs-module/Makefile change · 6096f811
      Glenn Morris authored
      * test/data/emacs-module/Makefile.in (clean):
      Avoid doing unpleasant things if run in a build without modules.
      6096f811
    • Glenn Morris's avatar
      Small improvements for test/data/emacs-module/Makefile · 5f25857f
      Glenn Morris authored
      * test/data/emacs-module/Makefile.in (%.o):
      Fix emacs-module dependency.
      (SECONDARY): Stop make automatically deleting *.o.
      (clean): New rule.
      5f25857f
    • Philipp Stephani's avatar
      Test module: add necessary version checks · 272235c1
      Philipp Stephani authored
      * test/data/emacs-module/mod-test.c (emacs_module_init): Add necessary
      version checks.
      272235c1
    • Philipp Stephani's avatar
      Use additional CFLAGS from configure · d7f6477c
      Philipp Stephani authored
      d7f6477c
    • Philipp Stephani's avatar
      Use Autoconf to generate the test module Makefile · c90a97ad
      Philipp Stephani authored
      This makes it easier to pass compilation flags around.
      
      * configure.ac: Also build test module Makefile.
      
      * test/data/emacs-module/Makefile.in: New makefile template.
      
      * test/Makefile.in ($(test_module)): No longer necessary to pass
      @MODULES_SUFFIX@ around.
      
      * .gitignore: Test module Makefile can now be ignored.
      c90a97ad
    • Philipp Stephani's avatar
      Also compile test module as C11 · 909dfaf3
      Philipp Stephani authored
      * test/data/emacs-module/Makefile (CFLAGS): Compile test module as C11
      909dfaf3
    • Philipp Stephani's avatar
      Implement module assertions for users · cf971327
      Philipp Stephani authored
      Add a new command-line option '-module-assertions' that users can
      enable developing or debugging a module.  If this option is present,
      Emacs performs additional checks to verify that modules fulfill their
      requirements.  These checks are expensive and crash Emacs if modules
      are invalid, so disable them by default.
      
      This is a command-line option instead of an ordinary variable because
      changing it while Emacs is running would cause data structure
      imbalances.
      
      * src/emacs.c (main): New command line option '-module-assertions'.
      
      * src/emacs-module.c (module_assert_main_thread)
      (module_assert_runtime, module_assert_env, module_assert_value):
      New functions to assert module requirements.
      (syms_of_module): New uninterned variable 'module-runtimes'.
      (init_module_assertions, in_main_thread, module_abort): New helper
      functions.
      (initialize_environment): Initialize value list.  If assertions are
      enabled, use a heap-allocated environment object.
      (finalize_environment): Add assertion that environment list is never
      empty.
      (finalize_runtime_unwind): Pop module runtime object stack.
      (value_to_lisp): Assert that the value is valid.
      (lisp_to_value): Record new value if assertions are enabled.
      (mark_modules): Mark allocated object list.
      (MODULE_FUNCTION_BEGIN_NO_CATCH)
      (module_non_local_exit_check, module_non_local_exit_clear)
      (module_non_local_exit_get, module_non_local_exit_signal)
      (module_non_local_exit_throw): Assert thread and environment.
      (module_get_environment): Assert thread and runtime.
      (module_make_function, module_funcall, module_intern)
      (module_funcall, module_make_integer, module_make_float)
      (module_make_string, module_make_user_ptr, module_vec_get)
      (funcall_module, Fmodule_load): Adapt callers.
      (module_make_global_ref): If assertions are enabled, use the global
      environment to store global values.
      (module_free_global_ref): Remove value from global value list.
      
      * test/Makefile.in (EMACSOPT): Enable module assertions when testing
      modules.
      
      * test/data/emacs-module/mod-test.c (Fmod_test_invalid_store)
      (Fmod_test_invalid_load): New functions to test module assertions.
      (emacs_module_init): Bind the new functions.
      
      * test/src/emacs-module-tests.el (mod-test-emacs): New constant for
      the Emacs binary file.
      (mod-test-file): New constant for the test module file name.
      (module--test-assertions): New unit test.
      cf971327
  2. 11 Jun, 2017 2 commits
    • Michael Albinus's avatar
      Some further improvements for tramp-gvfs.el · 87958db4
      Michael Albinus authored
      * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name)
      (tramp-gvfs-get-file-attributes)
      (tramp-gvfs-maybe-open-connection): Handle davs? properly.
      (tramp-gvfs-handler-askquestion): Improve `yes-or-no-p' prompt.
      Show question also in batch mode.  Cache result.
      
      * test/lisp/net/tramp-tests.el (tramp-test24-file-name-completion):
      Support completion for host names and ports.
      87958db4
    • Simen Heggestøyl's avatar
      Fix highlighting of CSS selectors with double hyphens · ee051688
      Simen Heggestøyl authored
      * lisp/textmodes/css-mode.el (css--font-lock-keywords): Fix
      highlighting of selectors that contain double hyphens.  They would be
      mistaken for a variable.
      ee051688
  3. 09 Jun, 2017 1 commit
    • Philipp Stephani's avatar
      Give test files a -tests.el suffix · 39121649
      Philipp Stephani authored
      Rename a couple of test files that have the same name as the library
      they test.  This harmonizes the naming pattern and makes it possible
      to have the tests directories in the load path.
      39121649
  4. 06 Jun, 2017 1 commit
    • Glenn Morris's avatar
      More small authors.el updates · a203e717
      Glenn Morris authored
      * admin/authors.el (authors-aliases): Fix recent addition.
      (authors-obsolete-files-regexps, authors-no-scan-regexps)
      (authors-ignored-files, authors-valid-file-names)
      (authors-renamed-files-alist): Additions.
      ; * lisp/vc/pcvs.el, test/lisp/emacs-lisp/checkdoc-tests.el:
      ; Fix Author headers.
      ; * ChangeLog.2: Fixes.
      a203e717
  5. 05 Jun, 2017 3 commits
  6. 04 Jun, 2017 1 commit
    • Philipp Stephani's avatar
      Rework printing of module functions · 3b0080de
      Philipp Stephani authored
      Fix a FIXME in emacs-module.c.  Put the printing into print.c, like
      other types.
      
      * src/print.c (print_vectorlike): Add code to print module functions.
      
      * src/emacs-module.c (funcall_module): Stop calling
      'module_format_fun_env'.  Now that module functions are first-class
      objects, they can be added to signal data directly.
      (module_handle_signal): Remove now-unused function
      'module_format_fun_env'.
      
      * test/src/emacs-module-tests.el (mod-test-sum-test): Adapt unit test.
      
      * src/eval.c (funcall_lambda): Adapt call to changed signature of
      'funcall_module'.
      3b0080de
  7. 03 Jun, 2017 2 commits
    • Simen Heggestøyl's avatar
      Support a new CSS indentation style · d2d6e445
      Simen Heggestøyl authored
      * lisp/textmodes/css-mode.el (css-smie-rules): Indent after property
      immediately followed by a newline.
      
      * test/manual/indent/css-mode.css: Add test for the change above.
      
      * test/manual/indent/scss-mode.scss: Ditto.
      d2d6e445
    • Philipp Stephani's avatar
      Fix a bug when using format field numbers · 7d413cb4
      Philipp Stephani authored
      Previously styled_format overwrite the argument vector.  This is no
      longer possible because there might be more than one specification per
      argument.  Use the existing auxiliary info array instead.
      
      * src/editfns.c (styled_format): Record arguments in the info
      structure instead of overwriting them.
      * test/src/editfns-tests.el (format-with-field): Add unit test.
      7d413cb4
  8. 02 Jun, 2017 1 commit
    • Glenn Morris's avatar
      Fix with-todo-test · f0d79d2b
      Glenn Morris authored
      * test/lisp/calendar/todo-mode-tests.el (with-todo-test):
      HOME should be a directory, not a file.  Delete it when finished.
      f0d79d2b
  9. 01 Jun, 2017 10 commits
    • Paul Eggert's avatar
      Limit format fields to more POSIX-like spec · 8de2581a
      Paul Eggert authored
      * doc/lispref/strings.texi (Formatting Strings):
      Don’t allow mixing numbered with unnumbered format specs.
      * src/editfns.c (styled_format): Don’t bother checking for field 0,
      since it doesn’t crash and the behavior is not specified.
      * test/src/editfns-tests.el (format-with-field): Adjust tests to
      match current doc.  Add more tests for out-of-range fields.
      8de2581a
    • Paul Eggert's avatar
      Minor improvements to format field numbers · 53247108
      Paul Eggert authored
      * src/editfns.c (styled_format): Allow field numbers in a %% spec.
      No need for a special diagnostic for field numbers greater than
      PTRDIFF_MAX.  Reword diagnostic for field 0.
      * test/src/editfns-tests.el (format-with-field): Adjust to match.
      53247108
    • Philipp Stephani's avatar
      Implement field numbers in format strings · 0dd1bbb0
      Philipp Stephani authored
      A field number explicitly specifies the argument to be formatted.
      This is especially important for potential localization work, since
      grammars of various languages dictate different word orders.
      
      * src/editfns.c (Fformat): Update documentation.
      (styled_format): Implement field numbers.
      
      * doc/lispref/strings.texi (Formatting Strings): Document field numbers.
      
      * lisp/emacs-lisp/bytecomp.el (byte-compile-format-warn): Adapt.
      
      * test/src/editfns-tests.el (format-with-field): New unit test.
      0dd1bbb0
    • Stephen Berman's avatar
      Correct and isolate the todo-mode test environment · 8c0f845b
      Stephen Berman authored
      This avoids having to set todo-mode variables globally in the test
      file and prevents any exisiting user todo-mode files from influencing
      the tests.
      
      * test/lisp/calendar/todo-mode-tests.el:
      (with-todo-test): New macro.
      (todo-test-todo-quit01, todo-test-todo-quit02)
      (todo-test-item-highlighting): Use it.
      8c0f845b
    • Eli Zaretskii's avatar
      Improve testing of octal and hex display of raw bytes · 5dc0129c
      Eli Zaretskii authored
      * test/manual/redisplay-testsuite.el (test-redisplay-5-toggle)
      (test-redisplay-5): Add a test with a large codepoint.
      5dc0129c
    • Vasilij Schneidermann's avatar
      Add customizable to display raw bytes as hex · cb9aa351
      Vasilij Schneidermann authored
      * src/xdisp.c (get_next_display_element): Dispatch used format string
      for unprintables based on new display-raw-bytes-as-hex variable.
      (display-raw-bytes-as-hex): New variable.  (Bug#27122)
      
      * lisp/cus-start.el: Add defcustom form for display-raw-bytes-as-hex.
      
      * doc/emacs/display.texi: Document the new variable.
      * etc/NEWS: Mention display-raw-bytes-as-hex.
      
      * test/manual/redisplay-testsuite.el (test-redisplay-5-toggle)
      (test-redisplay-5): New tests.
      (test-redisplay): Call test-redisplay-5.
      cb9aa351
    • Eli Zaretskii's avatar
      Revert "Add customizable to display raw bytes as hex" · e5de7999
      Eli Zaretskii authored
      This reverts commit 7c9ac111.
      e5de7999
    • Eli Zaretskii's avatar
      Add customizable to display raw bytes as hex · 7c9ac111
      Eli Zaretskii authored
      * src/xdisp.c (get_next_display_element): Dispatch used format string
      for unprintables based on new display-raw-bytes-as-hex variable.
      (display-raw-bytes-as-hex): New variable.  (Bug#27122)
      
      * lisp/cus-start.el: Add defcustom form for display-raw-bytes-as-hex.
      
      * doc/emacs/display.texi: Document the new variable.
      * etc/NEWS: Mention display-raw-bytes-as-hex.
      
      * test/manual/redisplay-testsuite.el (test-redisplay-5-toggle)
      (test-redisplay-5): New tests.
      (test-redisplay): Call test-redisplay-5.
      7c9ac111
    • Glenn Morris's avatar
      Quieten compilation of some test files · afcbec61
      Glenn Morris authored
      * test/lisp/dired-tests.el (dired-test-bug25609): Mark unused args.
      * test/src/data-tests.el (binding-test-set-constant-t)
      (binding-test-set-constant-nil, binding-test-set-constant-keyword)
      (binding-test-set-constant-nil): Silence compiler.
      * test/src/regex-tests.el (regex-tests-BOOST): Escape char literal.
      afcbec61
    • Glenn Morris's avatar
      Avoid elisp-mode test failures when source dir has multiple names · c4ecc01a
      Glenn Morris authored
      * test/lisp/progmodes/elisp-mode-tests.el (emacs-test-dir):
      Use the true name of the directory.
      c4ecc01a
  10. 31 May, 2017 4 commits
  11. 30 May, 2017 5 commits
    • Glenn Morris's avatar
      Make "make check" less verbose by default · dd5b1c0d
      Glenn Morris authored
      * test/Makefile.in (AM_DEFAULT_VERBOSITY, AM_V_ELC, am__v_ELC_)
      (am__v_ELC_0, am__v_ELC_1, AM_V_GEN, am__v_GEN_, am__v_GEN_0)
      (am__v_GEN_1, AM_V_at, am__v_at_, am__v_at_0, am__v_at_1):
      New, copied from lisp/Makefile.in.
      (%.elc, %.log): Simplify and quieten.
      dd5b1c0d
    • Glenn Morris's avatar
      Reduce scope of recent test/Makefile HOME change · d17aa3e5
      Glenn Morris authored
      * test/Makefile.in (%.log): Move setting of HOME here from top-level.
      d17aa3e5
    • Paul Eggert's avatar
      Skip .#* temporaries when finding sources · 1b01601d
      Paul Eggert authored
      Without this patch, ‘make check’ can fail with the diagnostic
      ‘invalid syntax in conditional’ if there is an Emacs temporary
      file whose name starts with ‘.#’, because the ‘#’ is treated as
      the start of a Make comment.
      * lisp/Makefile.in (loaddefs, tagsfiles, check-defun-deps):
      * test/Makefile.in (ELFILES):
      Skip files starting with ‘.’, so that the .#* files do not cause
      trouble.  (We cannot easily skip just files starting with ‘.#’,
      since ‘#’ starts a Make comment!)
      1b01601d
    • Glenn Morris's avatar
      Stop make check interacting with HOME · 412c38aa
      Glenn Morris authored
      * test/Makefile.in (HOME): Export a non-existent value.
      412c38aa
    • Glenn Morris's avatar
      todo-mode: don't assume an ordering of tests · 941a2e73
      Glenn Morris authored
      * test/lisp/calendar/todo-mode-tests.el (todo-test-todo-quit02)
      (todo-test-item-highlighting): Avoid prompting for input file.
      941a2e73
  12. 29 May, 2017 1 commit
    • Stephen Berman's avatar
      Add initial tests for todo-mode.el · 299a96c7
      Stephen Berman authored
      *test/lisp/calendar/todo-mode-tests.el:
      *test/lisp/calendar/todo-mode-resources/todo-test-1.toda:
      *test/lisp/calendar/todo-mode-resources/todo-test-1.todo: New files.
      
      * .gitattributes: Ignore trailing whitespace in todo-mode test
      data files, since it is part of the todo-mode file format.
      299a96c7