Skip to content

Commit

Permalink
[#703] Add test cases based on the issue report
Browse files Browse the repository at this point in the history
  • Loading branch information
Fuco1 committed Mar 4, 2018
1 parent 8efc55c commit 4095e9e
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions test/smartparens-delete-selection-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,38 @@
(sp-test-with-temp-binding ("d" 'sp-backward-delete-char)
(execute-kbd-macro "d"))
(sp-buffer-equals "(fo|ar)")))

;; #703
(ert-deftest sp-test-delete-selection-mode/empty-sexp/point-before-mark ()
(sp-test-delsel "(|
M)"
(sp-test-with-temp-binding ("d" 'sp-backward-delete-char)
(execute-kbd-macro "d"))
(sp-buffer-equals "(|M)")))

(ert-deftest sp-test-delete-selection-mode/empty-sexp/point-after-mark ()
(sp-test-delsel "(M
|)"
(sp-test-with-temp-binding ("d" 'sp-backward-delete-char)
(execute-kbd-macro "d"))
(sp-buffer-equals "(M|)")))

(ert-deftest sp-test-delete-selection-mode/nonstrict/empty-sexp/point-before-mark ()
(sp-test-delsel "(|
M)"
(smartparens-strict-mode -1)
(sp-test-with-temp-binding ("d" 'sp-backward-delete-char)
(execute-kbd-macro "d"))
(sp-buffer-equals "(|M)")))

(ert-deftest sp-test-delete-selection-mode/nonstrict/empty-sexp/point-after-mark ()
(sp-test-delsel "(M
|)"
(smartparens-strict-mode -1)
(sp-test-with-temp-binding ("d" 'sp-backward-delete-char)
(execute-kbd-macro "d"))
(sp-buffer-equals "(M|)")))

0 comments on commit 4095e9e

Please sign in to comment.