aboutsummaryrefslogtreecommitdiffstats
path: root/test/lisp/mh-e (follow)
Commit message (Collapse)AuthorAgeFilesLines
* MH-E: support Mailutils "folders +/"Stephen Gildea2021-11-251-4/+7
| | | | | | | * lisp/mh-e/mh-utils.el (mh-sub-folders-parse): Support Mailutils style of "folders +/" output. * test/lisp/mh-e/mh-utils.el: Test "folders +/" with GNU Mailutils 3.13.91 and later.
* mh-utils-tests: 'mh-sub-folders-actual' coverageStephen Gildea2021-11-241-0/+46
| | | | | | | | * test/lisp/mh-e/mh-utils.el (mh-sub-folders-parse-no-folder) (mh-sub-folders-parse-relative-folder, mh-sub-folders-parse-root-folder): New tests. * lisp/mh-e/mh-utils.el (mh-sub-folders-parse): New function, refactored out of 'mh-sub-folders-actual' to create a testing seam.
* mh-utils-tests: Add new tests of "folders +/"Stephen Gildea2021-11-242-22/+31
| | | | | | | | | | | | | * test/lisp/mh-e/mh-utils-tests.el (mh-sub-folders-actual, mh-sub-folders): Add new tests of "folders +/". Rewrite tests that were using 'assoc' to use 'member' instead, so that on failure, ERT logs the list of which the element was not a member, rather than the 'nil' returned by 'assoc'. (mh-test-variant-handles-plus-slash): Factor out new helper function. (mh-folder-completion-function-08-plus-slash) (mh-folder-completion-function-09-plus-slash-tmp): Use new helper function. * test/lisp/mh-e/test-all-mh-variants.sh: LD_LIBRARY_PATH unnecessary.
* Fix two failing tests in mh-utils-testsMike Kupfer2021-11-171-2/+12
| | | | | | | | * test/lisp/mh-e/mh-utils-tests.el (mh-test-utils-mock-call-process): Add mock for root folders. (mh-folder-completion-function-08-plus-slash) (mh-folder-completion-function-09-plus-slash-tmp): Skip these tests with Mailutils, which doesn't handle root folders. (Bug#51902)
* Temporarily mark two failing tests as unstableStefan Kangas2021-11-171-5/+7
| | | | | | | * test/lisp/mh-e/mh-utils-tests.el (mh-folder-completion-function-08-plus-slash) (mh-folder-completion-function-09-plus-slash-tmp): Temporarily mark two failing tests as unstable.
* Fix handling of folder "+/" in MH-EMike Kupfer2021-11-151-4/+2
| | | | | | | | | * lisp/mh-e/mh-utils.el (mh-sub-folders): Fix handling of "+/". * test/lisp/mh-e/mh-utils-tests.el (mh-folder-completion-function-08-plus-slash) (mh-folder-completion-function-09-plus-slash-tmp): Fix errors made importing tests from mh-unit.el; remove declaration that these tests are expected to fail.
* MH-E threads code: use mh-scan variables correctlyStephen Gildea2021-11-131-0/+131
| | | | | | | | | | | | | * lisp/mh-e/mh-thread.el (mh-thread-current-indentation-level) (mh-thread-find-children): Fix off-by-one error by using 'mh-scan-field-from-start-offset' directly, as 'mh-thread-parse-scan-line' does. Previously, these functions would incorrectly consider the "date note" column as part of the thread indenting. Since that column is almost always a Space character, that almost always worked. (mh-thread-ancestor): Update caller. * test/lisp/mh-e/mh-thread-tests.el: New unit tests for affected code. * lisp/mh-e/mh-scan.el (mh-msg-num-width-to-column): Fix doc string typo.
* ; Fix typosStefan Kangas2021-11-121-1/+1
|
* ; * test/lisp/mh-e/mh-utils-tests.el: Update macro declarations.Stephen Gildea2021-10-221-1/+3
|
* Expanded testing of MH-E with multiple MH variantsStephen Gildea2021-10-092-19/+179
| | | | | | | | | * test/lisp/mh-e/mh-utils-tests.el: Environment variable TEST_MH_PATH controls which installed MH variant to test with. Moved the commentary about testing with different MH variants from above 'with-mh-test-env' definition to "Commentary" section at the top of the file. * test/lisp/mh-e/test-all-mh-variants.sh: New script to test all installed MH variants.
* Refactor mh-utils-tests macro 'with-mh-test-env'Stephen Gildea2021-10-051-17/+19
| | | | | | | * test/lisp/mh-e/mh-utils-tests.el (with-mh-test-env): Refactor to reduce the size of the expanded macro. (mh-test-utils-setup): New helper function. (mh-ensure-native-trampolines): Absorbed by mh-test-utils-setup.
* native-comp-available-p is the definitive testStephen Gildea2021-10-051-1/+1
| | | | | | | | | | * doc/lispref/compile.texi (Native Compilation): Document native-comp-available-p as the way to test for native compilation. * lisp/emacs-lisp/package.el (package--native-compile-async): * test/lisp/mh-e/mh-utils-tests.el (mh-ensure-native-trampolines): Test for native compilation with native-comp-available-p. Thank you to Andrea Corallo for reviewing this patch.
* * Fix mh tests for native comp builds (bug#50975)Andrea Corallo2021-10-041-0/+11
| | | | | | | * test/lisp/mh-e/mh-utils-tests.el (mh-ensure-native-trampolines): New function. (mh-test-utils-setup-with-mocks) (mh-test-utils-setup-with-variant): Use it.
* Migrate MH-E functional tests from SourceForgeStephen Gildea2021-09-213-0/+458
| | | | | | | | | | | | | | | | | | | | | | | * test/lisp/mh-e/mh-limit-tests.el: * test/lisp/mh-e/mh-utils-tests.el: * test/lisp/mh-e/mh-xface-tests.el: Import the functional tests from src/mh-unit.el. mh-unit.el is from the old SourceForge mh-e repository, last changed in 2017. To this are applied unmerged patches Mike Kupfer wrote in 2018 ("Refactor mh-unit into functional and release tests" and "Fix the functional tests"). All tests have been converted to run under Emacs's ERT framework. Some tests for mh-utils use MH programs to examine mail folders. These tests require an MH variant to be installed on the system; for these, added both a mock harness that pretends the needed files and MH programs do exist, and a wrapper that creates the necessary mail files. New function 'mh-test-utils-setup-with-variant' bears some resemblance to 'mh-test-folders-set-up' from the original tests. New function 'mh-test-utils-setup-with-mocks' is new functionality for these tests.
* mh-x-image-url-sane-p: accept "https" URLsStephen Gildea2021-08-211-0/+35
* lisp/mh-e/mh-xface.el (mh-x-image-url-sane-p): Accept https URLs. * test/lisp/mh-e/mh-xface.el: New file, to test mh-x-image-url-sane-p.