summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTaylor R Campbell <campbell@paredit.org>2022-11-26 01:42:34 +0000
committerTaylor R Campbell <campbell@paredit.org>2022-11-26 01:42:34 +0000
commit928fb082624e6b78040fb1aec9fe82694989d58c (patch)
tree8136dd720a6062a3980f23db197aa7c61b40c731
parent683b454ff269600c59ffbbded415058971adde86 (diff)
Test paredit-forward-kill-word, paredit-backward-kill-word.
Turns up some nasty edge cases I missed, oops.
-rw-r--r--test.el26
1 files changed, 26 insertions, 0 deletions
diff --git a/test.el b/test.el
index 3930e43..8435d87 100644
--- a/test.el
+++ b/test.el
@@ -1613,5 +1613,31 @@ Four arguments: the paredit command, the text of the buffer
"\n(f xy\n z\n w)\n;;;|T "
"\n(f xy\n z\n w)\n;;;|T "))))
+(paredit-test 'paredit-forward-kill-word
+ '(("|(hello \"world\")"
+ "(| \"world\")"
+ "( \"|\")"
+ error)
+ ("(hello| \"world\")"
+ "(hello \"|\")")
+ ("(hello \"world|\")" error)
+ ("(hello \"world\"|)" error)
+ ("(hello \"world\")|" error)))
+
+(paredit-test 'paredit-backward-kill-word
+ '(("(hello \"world\")|"
+ "(hello \"|\")"
+ "(|\"\")"
+ ;; error or nop -- XXX broken
+ )
+ ("(hello \"|world\")"
+ "(|\"world\")"
+ ;; error or nop -- XXX broken
+ )
+ ("(|hello \"world\")"
+ ;; error or nop -- XXX broken
+ )
+ ("|(hello \"world\")" "|(hello \"world\")")))
+
(if (> paredit-test-nfailures 0)
(error "%S paredit tests failed" paredit-test-nfailures))