diff options
author | Taylor R Campbell <campbell@paredit.org> | 2022-11-26 01:20:54 +0000 |
---|---|---|
committer | Taylor R Campbell <campbell@paredit.org> | 2022-11-26 01:34:21 +0000 |
commit | 683b454ff269600c59ffbbded415058971adde86 (patch) | |
tree | 41a4d965b70d33be29967760e469c05fe59e1286 /test.el | |
parent | daf21e0bbf7a7dc68cc6ba3cbbe4f210f95cbf81 (diff) |
Fix column preservation in text fields like ielm after prompt.
Add a hacky one-off test to assemble buffer text with a field.
Diffstat (limited to 'test.el')
-rw-r--r-- | test.el | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -1251,6 +1251,26 @@ Four arguments: the paredit command, the text of the buffer ("\"|foo\\\"bar\"" error) ;++ ("(\"|foo\\\;bar\")" error) )) + +(let ((prompt "prompt> ") + (before "(foo (bar| baz))") + (expected "(foo bar| baz)")) + (with-temp-buffer + (paredit-test-buffer-setup) + (insert prompt) + (add-text-properties (point-min) (point-max) '(field output)) + (insert before) + (goto-char (length prompt)) + (search-forward "|") + (delete-char -1) + (call-interactively 'paredit-splice-sexp) + (insert "|") + (let ((actual (buffer-string))) + (if (not (string= (concat prompt expected) actual)) + (paredit-test-failed 'paredit-splice-sexp + (concat prompt before) + actual + (concat prompt expected)))))) (paredit-test 'paredit-forward-slurp-sexp '(("|" error) |