summaryrefslogtreecommitdiff
path: root/test/lisp/whitespace-tests.el
Commit message (Collapse)AuthorAgeFilesLines
* ; Add 2024 to copyright yearsPo Lu2024-01-021-1/+1
|
* ; Add 2023 to copyright years.Eli Zaretskii2023-01-011-1/+1
|
* ; whitespace.el: Use the new 'ert-with-buffer-selected' in testsRichard Hansen2022-12-291-10/+3
| | | | | | | | | | | | Commit 286c48137f69fa96b80d197da90c69a42df604a3 added a new `ert-with-test-buffer-selected' macro. Use that macro in 'whitespace-mode' tests to avoid code duplication. (Bug#60332) * test/lisp/whitespace-tests.el (whitespace--with-buffer-selected): Macro deleted. (whitespace-tests--indirect-clone-breaks-base-markers) (whitespace-tests--indirect-clone-markers) (whitespace-tests--regular-clone-markers): Use 'ert-with-buffer-selected'.
* whitespace: Avoid mutating original buffer's markers in clonesRichard Hansen2022-12-211-0/+75
| | | | | | | | | | | | | | | | * lisp/whitespace.el (whitespace--clone): New hook function that is run after cloning a buffer that copies `whitespace-bob-marker' and `whitespace-eob-marker' and changes the copies to point to the new buffer (Bug#59618). (whitespace-color-on): Register the hook function. (whitespace-color-off): Unregister the hook function. * test/lisp/whitespace-tests.el (whitespace-tests--with-test-buffer): New macro. (whitespace-tests--check-markers): New function. (whitespace-tests--indirect-clone-breaks-base-markers) (whitespace-tests--indirect-clone-markers) (whitespace-tests--regular-clone-markers): New tests.
* whitespace: Fix unintended change in buffer modification statusRichard Hansen2022-12-191-0/+10
| | | | | | | | | | | | * lisp/whitespace.el (whitespace--empty-at-bob-matcher) whitespace--empty-at-eob-matcher, whitespace--update-bob-eob): Silently add the `font-lock-multiline' text property when highlighting beginning-of-buffer and end-of-buffer empty lines to prevent Emacs from running modification hooks or considering the buffer to be modified (Bug#60066). * test/lisp/whitespace-tests.el (whitespace-tests--empty-bob-eob-modified): Add a regression test.
* ; whitespace: Add test case for read-only buffers (bug#58082)Richard Hansen2022-09-271-2/+19
|
* Fix whitespace-tests on macOSGerd Möllmann2022-09-131-5/+5
| | | | | | * test/lisp/whitespace-tests.el (whitespace-tests--empty-bob): (whitespace-tests--empty-eob): Use C-a/C-e instead of <home>/<end> (bug#57763).
* whitespace: Redo BoB/EoB empty line highlightingRichard Hansen2022-09-111-0/+230
| | | | | | | | | | | | | | | | | * lisp/whitespace.el (whitespace--empty-at-bob-matcher, whitespace--empty-at-eob-matcher, whitespace--update-bob-eob, whitespace-color-off, whitespace-color-on, whitespace-empty-at-bob-regexp, whitespace-empty-at-eob-regexp, whitespace-looking-back, whitespace-post-command-hook): Redo the `empty' line highlighting logic to ensure that a buffer change causes all affected `empty' lines to become (un)highlighted (bug#37467). Also, for improved UX, don't highlight BoB empty lines at or below point (not just when point is at 1), or EoB empty lines at or above point (not just when point is `eobp'). (whitespace-bob-marker, whitespace-eob-marker): Clarify documentation. * test/lisp/whitespace-tests.el (whitespace--with-test-buffer, whitespace--fu, whitespace-tests--empty-bob, whitespace-tests--empty-eob): Add tests.
* Adjust whitespace testsLars Ingebrigtsen2022-07-151-3/+2
|
* ; Add 2022 to copyright years.Eli Zaretskii2022-01-011-1/+1
|
* ; Minor stylistic checkdoc fixes in test/**/*.elStefan Kangas2021-09-261-1/+1
|
* Update copyright year to 2021Paul Eggert2021-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright".
* Update copyright year to 2020Paul Eggert2020-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* Update copyright year to 2019Paul Eggert2019-01-011-1/+1
| | | | Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
* Update copyright year to 2018Paul Eggert2018-01-011-1/+1
| | | | Run admin/update-copyright.
* Prefer HTTPS to FTP and HTTP in documentationPaul Eggert2017-09-131-1/+1
| | | | | | | | | | | | | 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.
* Fix turning off whitespace-modeNick Helm2017-05-191-0/+34
| | | | | | | | | | | | * lisp/whitespace.el (whitespace-display-char-on): Correct the way the original buffer-display-table is saved and restored when global-whitespace-mode is active. (Bug#26892) * test/lisp/whitespace-tests.el (whitespace-tests-whitespace-mode-on): New function. (whitespace-tests-display-tables): New test. Copyright-paperwork-exempt: yes
* Update copyright year to 2017 in masterPaul Eggert2017-01-011-1/+1
| | | | | | Run admin/update-copyright in the master branch. This fixes files that were not already fixed in the emacs-25 branch before it was merged here.
* Fix whitespace eob cleanupNoam Postavsky2016-12-241-0/+52
* lisp/whitespace.el (whitespace-empty-at-eob-regexp): Match any number of empty lines at end of buffer. * test/lisp/whitespace-tests.el (whitespace-cleanup-eob): New test. (whitespace-tests--cleanup-string): New helper function for tests.