aboutsummaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2026-04-02Avoid recursive persp-delete-frame cleanup on frame deletion.HEADmasterConstantine Vetoshev
2026-03-31Speed up persp-maybe-kill-buffer.Constantine Vetoshev
2026-03-31Add a test to help track down performance changes.Constantine Vetoshev
2026-03-29Add opt-in switching for other-perspective buffers.Constantine Vetoshev
2026-03-29Fix consult preview importing buffers into perspectives.Constantine Vetoshev
2026-02-02feat: add the 'oldest sort method to sort by creation day, ascendingIan S. Pringle
This adds the `'oldest` keyword to sort by creation day, ascending (oldest first). This also adds a test for this behavior and the needed documentation.
2022-03-10Documentation grammar.Nicholas Hubbard
2022-03-01Test persp-merge and persp-unmerge.Nicholas Hubbard
2021-11-21Put last-buffer kill check behind a feature flag.gcv
2021-10-21basic-persp-header-line-format-default-value: fix typoMatthew White
Remove leading tab.
2021-10-21basic-persp-switch-to-scratch-buffer: test *scratch* switchingMatthew White
New ert test designed to test 'persp-switch-to-scratch-buffer'. Test switching to a perspective's scratch buffer. Test if the scratch buffer is created when there isn't one.
2021-10-21basic-persp-get-scratch-buffer: test persp-get-scratch-bufferMatthew White
Test that the function 'persp-get-scratch-buffer' can get a scratch buffer from different perspectives without modifying it. Test that its created scratch buffer is conformant to a default scratch buffer.
2021-10-21basic-persp-get-scratch-buffer: test *scratch* buffer creationMatthew White
New ert test that verifies that the created scratch buffer conforms to the startup scratch buffer. The scratch buffer should be created with 'initial-scratch-message' command key descriptions resolved to command names. Also, its mode should be 'initial-major-mode'. It shouldn't have a modified flag.
2021-10-21basic-persp-forget-buffer: test persp-forget-bufferMatthew White
Test 'persp-forget-buffer' and 'persp-remove-buffer', also test the function 'persp-set-buffer'. The function 'persp-forget-buffer' should disassociate buffers with perspectives, never killing them. The function 'persp-remove-buffer' should disassociate buffers when they are shared between perspectives and kill unshared buffers, aka buffers not found in any other perspective.
2021-10-21basic-persp-killing-buffers: test killing buffersMatthew White
A buffer should not be killable when it's a perspective's last left buffer. This prevents adding a buffer from another perspective. A perspective can be killed, though, even if it has only one buffer. It should be possible to remove buffers from perspectives, unless a buffer is the perspective's last left buffer.
2021-10-21basic-persp-window-prev-buffers: ert test window-prev-buffersMatthew White
A dirty 'window-prev-buffers' may allow a perspective to pull in buffers from other perspectives. Till Emacs 27.2, 'delete-window' may update 'window-prev-buffers' for all windows. This means that after 'persp-reset-windows' the single window left may end up with a dirty 'window-prev-buffers', unless 'switch-to-buffer-preserve-window-point' is nil. Upstream commit 8f63f0078a23421eada97b4da51b9308b82532ce reverted window/winner changes (Revert 0454bfd3313) in Emacs (bug#23621). So, what said above should not apply any more after that commit, and 'switch-to-buffer-preserve-window-point' could not be used."
2021-10-20basic-persp-switching: add tests for the 'current-buffer'Matthew White
Switching to a new perspective should set the 'current-buffer' to the perspective's scratch buffer. Removing a buffer should switch to the next one available in the perspective setting it as current buffer.
2021-10-20basic-persp-set-buffer: test persp-set-bufferMatthew White
Thoroughly test 'persp-set-buffer'. It should not allow to share buffers between perspectives, and a non-existing buffer passed as argument should be discarded.
2021-10-20basic-persp-add-buffer: test persp-add-bufferMatthew White
Thoroughly test 'persp-add-buffer'. It should allow to share buffers between perspectives, a non-existing buffer passed as argument should be discarded.
2021-10-20basic-persp-get-buffer-names: test persp-get-buffer-namesMatthew White
Test the utility function 'persp-get-buffer-names'. Expect the list of a perspective's live buffers.
2021-10-20basic-persp-get-buffers: test persp-get-buffersMatthew White
Test the utility function 'persp-get-buffers'. Expect the list of a perspective's buffers.
2021-10-20basic-persp-creation-deletion: test killing all perspectivesMatthew White
Test 'persp-current-name' and also killing the main perspective. When killing the main perspective, preserve the *ert* buffer when the tests are run interactively, and always preserve *Messages*, because it's an ert's requirement for properly executing tests.
2021-10-20basic-persp-test-buffer-in-persps: test new ert's functionMatthew White
Test the new utility function 'persp-test-buffer-in-persps'. As arguments, expect a buffer or it's name, and perspective names, or perspective data (aka 'perspective-p' objects). The buffer must be a live buffer, but a perspective data not necessarily should reflect an existing perspective. The buffer must be found exactly in the given perspectives and not in all other existing perspectives. Perspectives owning the buffer may be provided as `perspective-p' data passed as arguments, even when it isn't of an existing perspective.
2021-10-20persp-test-buffer-in-persps: ert find buffer in perspectivesMatthew White
New ert's utility function. Verify that a buffer is in specified perspectives and not, at the same time, in the remaining existing perspectives.
2021-10-20baisc-persp-test-kill-extra-buffers: test new ert's functionMatthew White
Test the ert's utility function 'persp-test-kill-extra-buffers'. It should automatically cleanup *scratch* buffers that are not the main scratch buffer, and also the buffers provided as arguments.
2021-10-20persp-test-kill-extra-buffers: ert kill extra buffersMatthew White
Utility function to reset a state, cleaning up a list of extra buffers and, automatically each time it is called, "*scratch* (NAME)" buffers.
2021-10-20basic-persp-test-match-scratch-buffers: test new ert's functionMatthew White
Add tests for 'persp-test-match-scratch-buffers' utility function, to verify that it can detect buffers which may be all considered scratch buffer.
2021-10-20persp-test-match-scratch-buffers: ert list live scratch buffersMatthew White
New utility function to return a list of live buffers where all may be considered scratch buffers. Basically, buffers whose name begins with the string "*scratch*".
2021-10-20persp-test-with-persp: protect the cleanup of buffersMatthew White
If executing body fails, cleanup buffers and turn off 'persp-mode'.
2021-10-20persp-test-with-persp: kill other perspectives before buffersMatthew White
Kill other perspectives than the main perspective before cleaning up the buffers. This is to get rid of buffers that aren't found in the main perspective.
2021-10-20persp-test-with-persp: verify buffer exists before killing itMatthew White
Before killing a "*scratch* (NAME)" buffer, verify that it exists.
2021-10-20basic-persp-test-with-persp: test persp-test-with-persp macroMatthew White
Test if 'persp-test-with-persp' will try to kill a non-existent "*scratch* (NAME)" buffer just because a perspective named NAME exists. Other starred buffers like "*dummy* (NAME)" should not be killed just because follow the pattern "*scratch* (NAME)". Spotting a 'kill-buffer' failure caused by the execution of the macro code itself, may be subtle. That error may be suppressed and ert tests may fail for apparently unknown reasons. Buffers found only in other perspectives, not shared with main, should always be killed when killing their perspective.
2021-07-09basic-persp-header-line-format-default-value: new ert testMatthew White
Test whether disabling 'persp-mode' while in a buffer with a locally modified 'header-line-format' uses the latter's to update the global default value of 'header-line-format'. Because it shouldn't.
2021-07-08persp-test-with-persp: use delete, not delq, to remove stringsMatthew White
Strings comparison requires 'equal', not 'eq', i.e. 'delq' will not remove "main" (aka 'persp-initial-frame-name') from '("main" "A")'. Using 'delq', 'persp-test-with-persp' will try to improperly kill a scratch buffer named "*scratch* (main)", if 'persp-names' returns a list like '("main" "A")'.
2019-12-02Switched the test to lexical-binding as wellRyan Davis
2019-12-02Removed warnings that come up from byte compiling.Ryan Davis
This doesn't deal with lexical-let + cl.
2019-10-26Add a test for persp-state-save and persp-state-load.Constantine Vetoshev
2019-10-24Merge pull request #106 from nex3/zenspider/test-cleanupRyan Davis
Clean up buffer cleanup test code.
2019-10-24Extend persp-find-some to respect current perspective ordering when ↵Ryan Davis
persp-last nil.
2019-10-22Clean up buffer cleanup test code.Ryan Davis
* "main" -> persp-initial-frame-name. * use delq against persp-names directly. * mapc on kill-buffer + format.
2019-10-10Fix test suite bug.Constantine Vetoshev
When cleaning up perspectives, don't forget to remove their scratch buffers.
2019-10-10Merge pull request #81 from gcv/fix-persp-rename-scratchgcv
Rename perspective-specific scratch buffer when perspective is renamed
2019-10-02Add testing utilities. Add more basic feature tests.Constantine Vetoshev
2019-10-01Add a couple of very basic functionality tests.Constantine Vetoshev
2019-09-27Add a test.Constantine Vetoshev
2019-09-27Fix whitespace.Constantine Vetoshev
2019-09-27Add a test wrapper macro to reset persp environment between tests.Constantine Vetoshev
2019-09-27Refine issue #85 testNathaniel Nicandro
As per https://github.com/nex3/perspective-el/pull/85#issuecomment-535316131
2019-09-27Add test frameworkNathaniel Nicandro