1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-16 09:50:25 +00:00
Commit Graph

59 Commits

Author SHA1 Message Date
Paul Eggert
81487bf891 Port mod-test to --enable-gcc-warnings
* test/data/emacs-module/mod-test.c (NDEBUG): Undef, to prevent
GCC from complaining “error: unused variable ‘dummy’” and failing
to build the test, if --enable-gcc-warnings.
2019-05-05 09:08:24 -07:00
Eli Zaretskii
6709240b7a Fix compilation of mod-test.c on MinGW
* test/data/emacs-module/mod-test.c (Fmod_test_nanoseconds)
[__MINGW32__]: Use _Static_assert, not static_assert, as the
latter is not available in mingw.org's MinGW's assert.h.
2019-05-05 18:07:26 +03:00
Philipp Stephani
e95ecbe146 Use extract_time in test module.
* test/data/emacs-module/mod-test.c (Fmod_test_sleep_until): Use
extract_time for time argument.
(signal_wrong_type_argument): Remove unused function.

* test/src/emacs-module-tests.el (mod-test-sleep-until): Remove
unnecessary ‘float-time’.
2019-05-05 01:34:07 +02:00
Philipp Stephani
4d97e1a9ea Export major version of latest Emacs supported by emacs-module.h.
This is useful if module authors want to support multiple versions of
emacs-module.h.

* configure.ac (emacs_major_version): Define substitution.

* src/emacs-module.h.in (EMACS_MAJOR_VERSION): Define macro.

* doc/lispref/internals.texi (Module Initialization): Document
EMACS_MAJOR_VERSION preprocessor macro.

* test/data/emacs-module/mod-test.c (emacs_module_init): Verify
behavior of EMACS_MAJOR_VERSION.
2019-04-28 20:08:25 +02:00
Philipp Stephani
4eb7f9ef59 Unbreak build when building without GMP support.
Add support for a new preprocessor macro EMACS_MODULE_HAVE_MPZ_T to
emacs-module.h.  If this macro is defined, assume that mpz_t is
already defined and don’t include gmp.h.

Don’t document the new macro for now, as it’s unclear whether we want
to support this in modules outside the Emacs tree.

* src/emacs-module.h.in: Allow user to prevent inclusion of gmp.h.

* src/emacs-module.c: Use mini-gmp if GMP is unavailable.  Don’t
include gmp.h.

* src/lisp.h: Don’t require gmp.h.  It’s not needed for lisp.h.

* test/Makefile.in (GMP_LIB, GMP_OBJ): New variables.
($(test_module)): Use them.

* test/data/emacs-module/mod-test.c: Use mini-gmp if GMP is unavailable.
2019-04-24 23:27:43 +02:00
Philipp Stephani
c4bacb1215 Clarify rounding mode when converting to struct timespec.
* doc/lispref/internals.texi (Module Values): Clarify that the
truncation is towards negative infinity.

* test/data/emacs-module/mod-test.c (Fmod_test_nanoseconds): Add test
function.
(emacs_module_init): Define it.

* test/src/emacs-module-tests.el (mod-test-nanoseconds): New unit test.
2019-04-24 13:41:05 +02:00
Philipp Stephani
e290a7d173 Add module functions to convert from and to big integers.
* src/module-env-27.h: Add new module functions to convert big
integers.

* src/emacs-module.h.in (emacs_mpz): Define if GMP is available.

* src/emacs-module.c (module_extract_big_integer)
(module_make_big_integer): New functions.
(initialize_environment): Use them.

* test/data/emacs-module/mod-test.c (Fmod_test_double): New test
function.
(emacs_module_init): Define it.

* test/src/emacs-module-tests.el (mod-test-double): New unit test.

* doc/lispref/internals.texi (Module Values): Document new functions.
2019-04-24 12:53:54 +02:00
Philipp Stephani
bffceab633 Add conversions to and from struct timespec to module interface.
Time values are a fundamental data type, and such conversions are hard
to implement within modules because of the various forms of time
values in Emacs Lisp.  Adding dedicated conversion functions can
significantly simplify module code dealing with times.

This approach uses nanosecond precision.  While Emacs in theory has
support for higher-precision time values, in practice most languages
and standards, such as POSIX, C, Java, and Go, have settled on
nanosecond-precision integers to represent time.

* src/emacs-module.h.in: Add header for struct timespec.

* src/module-env-27.h: Add module functions for time conversion.

* src/emacs-module.c (module_extract_time, module_make_time): New
functions.
(initialize_environment): Use them.

* test/data/emacs-module/mod-test.c (Fmod_test_add_nanosecond): New
test function.
(emacs_module_init): Define it.

* test/src/emacs-module-tests.el (mod-test-add-nanosecond/valid)
(mod-test-add-nanosecond/nil, mod-test-add-nanosecond/invalid): New
unit tests.

* doc/lispref/internals.texi (Module Values): Document time
conversion functions.
2019-04-24 11:33:52 +02:00
Eli Zaretskii
09d746dad3 Revert "Revert "Revert "Rely on conservative stack scanning to find "emacs_value"s"""
This reverts commit 093d3e78d2,
which reverted ee7ad83f20,
which reverted 3eb93c07f7.
2019-03-22 11:02:46 +03:00
Eli Zaretskii
093d3e78d2 Revert "Revert "Rely on conservative stack scanning to find "emacs_value"s""
This reverts commit ee7ad83f20.

There was no consensus on reverting
3eb93c07f7, so doing that will have to
wait until the discussion ends.
2019-03-21 21:29:52 +02:00
Philipp Stephani
ee7ad83f20 Revert "Rely on conservative stack scanning to find "emacs_value"s"
This reverts commit 3eb93c07f7.

There was no consensus for that commit, see
https://lists.gnu.org/archive/html/emacs-devel/2016-01/msg00150.html.
Also, reverting this commit should fix Bug#31238.
2019-03-21 20:10:27 +01:00
Philipp Stephani
72ec233f2a Ignore pending_signals when checking for quits.
pending_signals is often set if no quit is pending.  This results in
bugs in module code if the module returns but no quit is actually
pending.

As a better alternative, add a new process_input environment function
for Emacs 27.  That function processes signals (like maybe_quit).

* configure.ac: Add module snippet for Emacs 27.

* src/module-env-27.h: New file.

* src/emacs-module.h.in: Add process_input function to environment
interface.

* src/emacs-module.c (module_should_quit): Use QUITP macro to check
whether the caller should quit.
(module_process_input): New function.
(initialize_environment): Use it.

* src/eval.c: Remove obsolete comment.

* test/data/emacs-module/mod-test.c (signal_wrong_type_argument)
(signal_errno): New helper functions.
(Fmod_test_sleep_until): New test module function.

* test/src/emacs-module-tests.el (mod-test-sleep-until): New unit
test.

* doc/lispref/internals.texi (Module Misc): Document process_input.
2019-02-24 22:43:07 +01:00
Nicholas Drozd
8282c34f0f Handle HTML 'ol' start attribute in shr.el
* lisp/net/shr.el (shr-tag-ol): Don't automatically assume
1-indexing for all ordered lists, use <ol> if given.

* etc/NEWS: Announce change in shr behavior.

* test/data/shr/ol.html:
* test/data/shr/ol.txt: New test data files.
2019-02-22 09:52:57 +02:00
Juri Linkov
4633b0ef3f * lisp/tar-mode.el (tar-extract): Call tar--try-jka-compr (bug#34251)
* lisp/tar-mode.el (tar--try-jka-compr): New function copied from
archive-try-jka-compr.

* lisp/arc-mode.el (archive-try-jka-compr): Set buffer-multibyte to t
instead of let-binding coding-system-for-read to 'no-conversion.

* test/data/decompress/tg.tar.gz:
* test/data/decompress/zg.zip: New fixtures.

* test/lisp/arc-mode-tests.el (arc-mode-test-zip-extract-gz):
* test/lisp/tar-mode-tests.el (tar-mode-test-tar-extract-gz): New tests.

* test/lisp/vc/diff-mode-tests.el (diff-mode-test-font-lock)
(diff-mode-test-font-lock-syntax-one-line): Skip unless shell and
diff executables are found.
2019-02-03 23:00:29 +02:00
Juri Linkov
42c8399059 * test/lisp/vc/diff-mode-tests.el (diff-mode-test-font-lock): New test.
(diff-mode-test-font-lock-syntax-one-line): New test for one line.

* test/data/vc/diff-mode/hello_world.c:
* test/data/vc/diff-mode/hello_world_1.c:
* test/data/vc/diff-mode/hello_emacs.c:
* test/data/vc/diff-mode/hello_emacs_1.c: New fixtures.

* lisp/vc/diff-mode.el (diff-syntax-fontify): Move remove-overlays
from diff-syntax-fontify-hunk.  (Bug#33567)
(diff-syntax-fontify-hunk): Remove VISIT arg from insert-file-contents.
2019-02-02 23:23:16 +02:00
Paul Eggert
ba809612c0 Merge from origin/emacs-26
2fcf2df Fix copyright years by hand
26bed8b Update copyright year to 2019
2814292 Fix value of default frame height.  (Bug#33921)
2018-12-31 17:57:29 -08:00
Paul Eggert
26bed8ba10 Update copyright year to 2019
Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
2019-01-01 01:01:13 +00:00
Glenn Morris
1afd313334 Merge from origin/emacs-26
54fb383 (origin/emacs-26) Fix detection of freed emacs_values (Bug#32...
769d0cd ; Fix out-of-tree build for mod-test.so
9a1329e Avoid crashes with very wide TTY frames on MS-Windows
9a613d3 Prevent `modify-file-local-variable-prop-line' from adding ex...
624e7dc Update GNOME bugtracker URLs
51ef6d5 Clarify in the Emacs manual that ChangeLog files are not used
6e08019 Recognize codepage 65001 as a valid encoding
1a350d7 ; * etc/NEWS: Fix format of first lines of some entries.
22d1f53 Avoid compilation warning in nt/addpm.c
7bc9ce7 Fix duplicate custom group names in bibtex.el
a9cf938 Fix outdated text in the Calc manual

Conflicts:
	etc/NEWS
	etc/PROBLEMS
	src/emacs-module.c
	src/gtkutil.c
	src/image.c
	src/xterm.c
	test/Makefile.in
2018-08-26 15:10:50 -07:00
Sergey Vinokurov
54fb383af6 Fix detection of freed emacs_values (Bug#32479)
* src/emacs-module.c (module_free_global_ref): Compare a value to be
freed with all entries of the list.

* test/data/emacs-module/mod-test.c (Fmod_test_globref_free): New
function.
(emacs_module_init): Make it accessible from Lisp.
* test/src/emacs-module-tests.el (mod-test-globref-free-test): New
test which uses it.
2018-08-25 18:57:56 -04:00
Philipp Stephani
75c663f834 Use 'defalias' in test module instead of 'fset'.
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.
2018-02-02 20:40:10 +01:00
Glenn Morris
60d5a13d28 Merge from origin/emacs-26
cfc94fd (origin/emacs-26) Don't mention 'vc-stay-local' in the user m...
8ce430b Fix a typo in calendar.texi
bb748b3 Minor improvement in wording of the Emacs manual
b603aff Revert "Fix tempfile creation when byte compiling"
4fd446e Fix tempfile creation when byte compiling
7f48a11 Improve the Emacs manual as suggested in emacs-manual-bugs
728ded0 * lisp/emacs-lisp/bytecomp.el: Tweak last change
c6c05e2 Unbreak building Emacs on FreeBSD
a41ad3d Don't unnecessarily use non-ASCII characters in C sources
c28d4b6 Portability fixes in emacs-module-tests
1d50c18 Add tests for term.el
2018-01-20 08:23:30 -08:00
Eli Zaretskii
c28d4b6d8e Portability fixes in emacs-module-tests
* test/Makefile.in (abs_top_srcdir): Add variable, needed by
CPPFLAGS.
* test/data/emacs-module/mod-test.c: Include <limits.h>.
(pT, pZ, T_TYPE, Z_TYPE): Compatibility macros, for systems that
don't support %td and %zu format specs.
(emacs_module_init): Use compatibility macros to make the error
messages print meaningful values (and avoid compiler warnings).
2018-01-19 11:20:12 +02:00
Paul Eggert
bb267f17f9 Merge from origin/emacs-26
63b04c11d5 Fix copyright years by hand
5c7dd8a783 Update copyright year to 2018
220a9ecba1 Merge from Gnulib
312c565566 Don't add empty keyboard macro to macro ring (Bug#24992)
39ca289a7a Allow customization of decoding of "man" command
f8240815ea * etc/NEWS: Add security consideration note on passphrase ...
0c78822c70 Fix subtle problem with scroll-down when scroll-margin is ...
acd289c5a4 Fix problems with indexing in User manual
b240c7846b * lisp/help.el (describe-key): Only (copy-sequence elt) wh...
e879a5444a * src/buffer.c (Frestore_buffer_modified_p): Fix bug#29846
81b1028b63 Improve documentation of 'inhibit-modification-hooks' and ...
7175496d7a Fix doc string of 'enable-recursive-minibuffers'
5b38406491 Fix documentation of delsel and of killing text

# Conflicts:
#	etc/NEWS
#	etc/refcards/ru-refcard.tex
2018-01-01 01:13:04 -08:00
Paul Eggert
5c7dd8a783 Update copyright year to 2018
Run admin/update-copyright.
2018-01-01 00:57:59 -08:00
Mark Oteiza
a17f30d7cd Add MIME apps spec utilities
Facilitates finding associations between MIME types and desktop files
that report an association with that type.  Combined with mailcap.el's
MIME facilities, it should be easy to use desktop files.
* lisp/xdg.el (xdg-mime-table): New variable.
(xdg-mime-apps-files, xdg-mime-collect-associations, xdg-mime-apps):
New functions.
* test/data/xdg/mimeapps.list: New file.
* test/data/xdg/mimeinfo.cache: New file.
* test/lisp/xdg-tests.el (xdg-mime-associations): New test.
2017-09-26 17:48:00 -04:00
Paul Eggert
bc511a64f6 Prefer HTTPS to FTP and HTTP in documentation
Most of this change is to boilerplate commentary such as license URLs.
This change was prompted by ftp://ftp.gnu.org's going-away party,
planned for November.  Change these FTP URLs to https://ftp.gnu.org
instead.  Make similar changes for URLs to other organizations moving
away from FTP.  Also, change HTTP to HTTPS for URLs to gnu.org and
fsf.org when this works, as this will further help defend against
man-in-the-middle attacks (for this part I omitted the MS-DOS and
MS-Windows sources and the test tarballs to keep the workload down).
HTTPS is not fully working to lists.gnu.org so I left those URLs alone
for now.
2017-09-13 15:54:37 -07:00
Mark Oteiza
e716538911 Avoid looking at localized strings
* lisp/xdg.el (xdg-desktop-read-group): Add condition to catch
localized strings.
* test/lisp/xdg-tests.el (xdg-desktop-parsing): Add test to ensure
parsing l10n strings doesn't error but is essentially a no-op.
2017-09-09 23:14:07 -04:00
Mark Oteiza
4131f9785e Add function to read all entries in a group
Use that to extend xdg-desktop-read-file.  Also fix a bug where all
entries in all groups were read and returned by xdg-desktop-read-file.
* lisp/xdg.el (xdg-desktop-read-group): New function.
(xdg-desktop-read-file): Use it.
* test/data/xdg/malformed.desktop: New file.
* test/data/xdg/test.desktop: Add another section.
* test/lisp/xdg-tests.el (xdg-desktop-parsing): Test presence of a key
in another group.  Test reading a prescribed group.  Test detecting a
malformed key=value.
2017-09-09 12:26:50 -04:00
Mark Oteiza
9604f9cd33 Add XDG desktop file parsing and tests
* lisp/xdg.el: Add support for Desktop Entry Specification.
(xdg--user-dirs-parse-line): Check if file is readable.
(xdg-desktop-group-regexp, xdg-desktop-entry-regexp): New variables.
(xdg--desktop-parse-line, xdg-desktop-read-file, xdg-desktop-strings):
New functions.
* test/lisp/xdg-tests.el:
* test/data/xdg/test.desktop:
* test/data/xdg/wrong.desktop: New files.
2017-09-06 13:17:05 -04:00
Mark Oteiza
9f64d59ae6 Add tests for mailcap.el
* test/data/mailcap/mime.types: New file.
* test/lisp/net/mailcap-tests.el: New file.
2017-09-05 11:55:01 -04:00
Philipp Stephani
b7dab24b79 Module assertions: check for garbage collections
It's technically possible to write a user pointer finalizer that calls
into Emacs module functions.  This would be disastrous because it
would allow arbitrary Lisp code to run during garbage collection.
Therefore extend the module assertions to check for this case.

* src/emacs-module.c (module_assert_thread): Also check whether a
garbage collection is in progress.

* test/data/emacs-module/mod-test.c (invalid_finalizer)
(Fmod_test_invalid_finalizer): New test module functions.
(emacs_module_init): Register new test function.

* test/src/emacs-module-tests.el (module--test-assertion)
(module--with-temp-directory): New helper macros.
(module--test-assertions--load-non-live-object): Rename existing
unit test, use helper macros.
(module--test-assertions--call-emacs-from-gc): New unit test.
2017-07-08 15:25:01 +02:00
Philipp Stephani
58b9b098a4 Inline test module Makefile into main test Makefile
The test/data/emacs-module/Makefile only built a single target, and
inlining it into test/Makefile simplifies dependency tracking and
reduces code duplication.

* configure.ac: Don't build test/data/emacs-module/Makefile.

* Makefile.in ($(test_module)): Inline compilation.
(clean): Also clean test module outputs.
2017-06-13 20:48:15 +02:00
Philipp Stephani
52c846d45d Print module structure sizes when initializing test module
* test/data/emacs-module/mod-test.c (emacs_module_init): Print
compile-time and runtime sizes of module structures to ease debugging
2017-06-12 23:46:02 +02:00
Philipp Stephani
1da7bc7e46 Fix off-by-one error
* test/data/emacs-module/mod-test.c (emacs_module_init): Fix
off-by-one error.
2017-06-12 23:36:10 +02:00
Glenn Morris
6096f81151 Improve previous test/data/emacs-module/Makefile change
* test/data/emacs-module/Makefile.in (clean):
Avoid doing unpleasant things if run in a build without modules.
2017-06-12 16:52:49 -04:00
Glenn Morris
5f25857f61 Small improvements for test/data/emacs-module/Makefile
* test/data/emacs-module/Makefile.in (%.o):
Fix emacs-module dependency.
(SECONDARY): Stop make automatically deleting *.o.
(clean): New rule.
2017-06-12 16:35:39 -04:00
Philipp Stephani
272235c1d5 Test module: add necessary version checks
* test/data/emacs-module/mod-test.c (emacs_module_init): Add necessary
version checks.
2017-06-12 16:28:16 +02:00
Philipp Stephani
d7f6477c01 Use additional CFLAGS from configure 2017-06-12 16:18:01 +02:00
Philipp Stephani
c90a97adc4 Use Autoconf to generate the test module Makefile
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.
2017-06-12 16:09:37 +02:00
Philipp Stephani
909dfaf325 Also compile test module as C11
* test/data/emacs-module/Makefile (CFLAGS): Compile test module as C11
2017-06-12 15:27:18 +02:00
Philipp Stephani
cf97132764 Implement module assertions for users
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.
2017-06-12 15:22:27 +02:00
Philipp Stephani
31fded0370 Reimplement module functions
Instead of a lambda, create a new type containing all data required to
call the function, and support it in the evaluator.  Because this type
now also needs to store the function documentation, it is too big for
Lisp_Misc; use a pseudovector instead.  That also has the nice benefit
that we don't have to add special support to the garbage collector.

Since the new type is user-visible, give it a predicate.

Now we can easily support 'help-function-args' and 'func-arity'; add
unit tests for these.

* src/lisp.h (allocate_module_function, MODULE_FUNCTIONP)
(XMODULE_FUNCTION): New pseudovector type 'module function'.

* src/eval.c (FUNCTIONP): Also treat module functions as functions.
(funcall_lambda, Ffuncall, eval_sub): Add support for calling module
functions.
(Ffunc_arity): Add support for detecting the arity of module
functions.

* src/emacs-module.c (module_make_function): Adapt to new structure.
Return module function object directly instead of wrapping it in a
lambda; remove FIXME.
(funcall_module): New function to call module functions.  Replaces
`internal--module-call' and is called directly from eval.c.
(syms_of_module): Remove internal helper function, which is no longer
needed.
(module_function_arity): New helper function.

* src/data.c (Ftype_of): Adapt to new implementation.
(Fmodule_function_p, syms_of_data): New user-visible function.  Now
that module functions are first-class objects, they deserve a
predicate.  Define it even if not compiled with --enable-modules so
that Lisp code doesn't have to check for the function's existence.

* src/doc.c (Fdocumentation): Support module functions.

* src/print.c (print_object): Adapt to new implementation.

* src/alloc.c (mark_object): Specialized garbage collector support is
no longer needed.

* lisp/help.el (help-function-arglist): Support module functions.
While there, simplify the arity calculation by using `func-arity',
which does the right thing for all kinds of functions.

* test/data/emacs-module/mod-test.c: Amend docstring so we can test
the argument list.

* test/src/emacs-module-tests.el (mod-test-sum-docstring): Adapt to
new docstring.
(mod-test-non-local-exit-signal-test): Because `internal--module-call'
is gone, the backtrace has changed and no longer leaks the
implementation.
(module--func-arity): New test for `func-arity'.
(module--help-function-arglist): New test for `help-function-arglist'.
2017-05-20 15:32:52 +02:00
Glenn Morris
db30296bae Put re-loaded file back at start of load-history (bug#26837)
* src/lread.c (readevalloop): Fix the "whole buffer" check to
operate in the correct buffer.
(Feval_buffer): Move point back to the start after checking
for lexical binding.
* test/src/lread-tests.el (lread-test-bug26837): New test.
* test/data/somelib.el, test/data/somelib2.el: New test data files.
2017-05-09 19:44:09 -04:00
Philipp Stephani
bfc0f610ba Integrate module test with normal test suite
* test/Makefile.in (ELFILES): Exclude module test if modules aren't
configured.
(EMACS_TEST_DIRECTORY): Expand test directory so that it's set
correctly even if Emacs changes the current directory.
($(srcdir)/src/emacs-module-tests.log)
($(test_module)): Proper dependency tracking for test module.

* test/data/emacs-module/Makefile (ROOT): Adapt to new location.
Remove 'check' target and EMACS variable, which are no longer
necessary.
(SO): Change to include period.

* test/src/emacs-module-tests.el (mod-test): Use EMACS_TEST_DIRECTORY
environment variable to reliably find test data.

* configure.ac (HAVE_MODULES, MODULES_SUFFIX): Add necessary
substitutions.
2017-04-29 14:38:53 +02:00
Lars Ingebrigtsen
e589018b48 Add image sizing tests for an image that's narrow 2017-04-24 07:56:31 +02:00
Lars Ingebrigtsen
b1fe497a44 Add tests to check image scaling functionality
This is in preparation to doing further work in this area to avoid
regressions.

* test/data/image/blank-200x100.png: New file for testing
image scaling.

* test/manual/image-size-tests.el: New file.
2017-04-21 06:13:06 +02:00
Noam Postavsky
b7250496bd Fix epg-tests with dummy-pinentry program (Bug#23619)
* test/data/epg/dummy-pinentry: New file.
* test/lisp/epg-tests.el (with-epg-tests): Add it to gpg-agent.conf
when a passphrase is required.  Add debug declaration.  Set
GPG_AGENT_INFO non-destructively.
2017-02-28 19:57:35 -05:00
Paul Eggert
81204b276f Port xref-tests to master branch
Also, add a test to make this problem less likely in the future.
* test/Makefile.in (check-no-automated-subdir): New rule.
(check, check-expensive, check-maybe): Depend on it.
* test/automated/data/xref/file1.txt: Rename to ...
* test/data/xref/file1.txt: ... here.
* test/automated/data/xref/file2.txt: Rename to ...
* test/data/xref/file2.txt: ... here.
* test/automated/xref-tests.el: Rename to ...
* test/lisp/progmodes/xref-tests.el: ... here.
(xref-tests-data-dir): Use EMACS_TEST_DIRECTORY.
2016-05-06 10:09:53 -07:00
Lars Magne Ingebrigtsen
331f4a6381 Encode the shr tests files with trailing white space 2016-04-24 15:18:29 +02:00
Lars Magne Ingebrigtsen
7570b35740 (shr-insert): Respect non-breaking space in non-<pre> text
* lisp/net/shr.el (shr-insert): Respect non-breaking space in
non-<pre> text.
2016-03-25 16:57:35 +01:00