From bea8f4e5c1ca5c3e56c54ff77b094a09dfc5304e Mon Sep 17 00:00:00 2001 From: Matus Goljer Date: Wed, 3 Apr 2024 16:54:17 +0200 Subject: [PATCH] test: add tests for #821 Fixes #821 --- test/smartparens-ess-test.el | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/smartparens-ess-test.el b/test/smartparens-ess-test.el index b1bddf2d..207a4088 100644 --- a/test/smartparens-ess-test.el +++ b/test/smartparens-ess-test.el @@ -82,3 +82,18 @@ kill it as a word/symbol" (sp-test--ess-mode) (execute-kbd-macro "\\(foo") (sp-buffer-equals "\"\\(foo|\\)\"")))) + +;; #821 +(sp-ert-deftest sp-test-ess-backwards-kill-word + :mode 'ess-r-mode + (sp-test-complex "c(\"test\", \"one\")|" + (sp-backward-kill-word 1) + "c(\"test\", \"|\")") + (sp-test-complex "c(\"test\", \"one\"|)" + (sp-backward-kill-word 1) + "c(\"test\", \"|\")") + (sp-test-complex "ggplot(mtcars, aes(mpg, am)) + + facet_wrap|()" + (sp-backward-kill-word 1) + "ggplot(mtcars, aes(mpg, am)) + + facet_|()"))