1. 06 May, 2017 2 commits
    • Eli Zaretskii's avatar
      Fix last change for MS-Windows · 89b5a828
      Eli Zaretskii authored
      * test/src/emacs-module-tests.el (module-function-object): Port to
      MS-Windows.
      89b5a828
    • Philipp Stephani's avatar
      Introduce new misc type for module function · a3e96940
      Philipp Stephani authored
      This resolves a couple of FIXMEs in emacs-module.c.
      
      * src/lisp.h (MODULE_FUNCTIONP, XMODULE_FUNCTION): New functions.
      
      * src/alloc.c (make_module_function): New function.
      (mark_object): GC support.
      
      * src/data.c (Ftype_of, syms_of_data): Handle module function type.
      
      * src/print.c (print_object): Print support for new type.
      
      * src/emacs-module.c (module_make_function, Finternal_module_call):
      Use new module function type, remove FIXMEs.
      (module_format_fun_env): Adapt and give it external linkage.
      
      * test/src/emacs-module-tests.el (module-function-object): Add unit
      test.
      a3e96940
  2. 29 Apr, 2017 1 commit
    • Philipp Stephani's avatar
      Integrate module test with normal test suite · bfc0f610
      Philipp Stephani authored
      * 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.
      bfc0f610
  3. 26 Mar, 2017 1 commit
  4. 01 Jan, 2017 1 commit
  5. 01 Jan, 2016 1 commit
  6. 06 Dec, 2015 2 commits
    • Paul Eggert's avatar
      Port mod-test to 32-bit Emacs --without-wide-int · ace6c253
      Paul Eggert authored
      * modules/mod-test/test.el (mod-test-sum-test):
      Bring back the 2**29 tests, but port them to 32-bit Emacs
      --without-wide-int.
      ace6c253
    • Paul Eggert's avatar
      Port mod-test to x86-64 GNU/Linux running 32-bit · 2b3f5de2
      Paul Eggert authored
      * modules/mod-test/test.el (mod-test-sum-test):
      Don’t attempt to match descriptions to operating systems.
      It didn’t work on Fedora x86-64 running a 32-bit executable,
      and it’s not worth the trouble anyway.
      Port to 32-bit platforms by removing an assumption about
      fixnum widths.
      2b3f5de2
  7. 02 Dec, 2015 1 commit
    • Eli Zaretskii's avatar
      More emacs-module.c fixes for wide ints · 36dbe6fc
      Eli Zaretskii authored
      * src/emacs-module.c (value_to_lisp) [WIDE_EMACS_INT]: Use
      unsigned data types to manipulate pointers, to avoid sign
      extension coming after us with a vengeance.
      
      * modules/mod-test/test.el (mod-test-sum-test): Add tests for
      Emacs with wide ints that verify integer values near the critical
      value that requires us to switch to a cons cell.
      36dbe6fc
  8. 01 Dec, 2015 1 commit
    • Eli Zaretskii's avatar
      Fix emacs-module.c for wide ints · bdebeb77
      Eli Zaretskii authored
      * src/emacs-module.c (lisp_to_value): Compare the produced value
      with the original Lisp object, not with the one potentially
      converted into a Lisp_Cons.  Fixes assertion violations when
      working with integers larger than fit into a 32-bit value.
      
      * modules/mod-test/test.el (mod-test-sum-test): Add tests for
      large integers, to test --with-wide-int.
      bdebeb77
  9. 29 Nov, 2015 1 commit
    • Ken Brown's avatar
      Update mod-test-sum-test · ff21f455
      Ken Brown authored
      * modules/mod-test/test.el (mod-test-sum-test): Update to
      accommodate the lack of dladdr on Cygwin.
      ff21f455
  10. 27 Nov, 2015 1 commit
  11. 24 Nov, 2015 1 commit
    • Eli Zaretskii's avatar
      Add one more mod-test test · 33ec2ff0
      Eli Zaretskii authored
      * modules/mod-test/test.el (mod-test-sum-test): Test the error
      signaled when the function is invoked with a wrong number of
      arguments.
      33ec2ff0
  12. 19 Nov, 2015 2 commits
  13. 18 Nov, 2015 1 commit
    • Aurélien Aptel's avatar
      Add dynamic module test and helper script · 955e25db
      Aurélien Aptel authored
      
      
      Add 'modhelp.py' script (python2) to automate module testing and
      module generation.
      
      To build and test all modules in the modules/ dir
        $ ./modhelp.py test
      
      To generate a module from template code (good starting point)
        $ ./modhelp init mynewtestmodule
      
      See the script -h option for more documentation.
      
      * modules/modhelp.py: New module helper script.
      * modules/mod-test/Makefile: New file. Makefile for the test module.
      * modules/mod-test/mod-test.c: New file. Test module source file.
      * modules/mod-test/test.el: New file. ert test suite for the test module.
      * modules/.gitignore: New file. Local .gitignore file.
      Co-authored-by: default avatarPhilipp Stephani <phst@google.com>
      955e25db