[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
writing a test for Bug#24672 (viper mode malfunction while inserting a p
writing a test for Bug#24672 (viper mode malfunction while inserting a paren in continued cpp directive)
Tue, 25 Oct 2016 22:09:40 -0700
This is a corner case.
When I start in viper mode with this file contents:
and then change the "z" to a parenthesis (either one), I get this:
[I have represented each TAB as "^I", of course]
Rather surprising to see all of those TAB characters inserted. To
reproduce, run this:
mkdir ~/empty && printf '#define z_b\\\n' > k.c \
&& HOME=$HOME/empty /bin/emacs -Q -f viper-mode k.c
hit "n", "n", and "5" at the successive prompts, then e.g., "fzs(" to
perform the change and to see the surprising result.
I tried to write a test case to encapsulate the above, but so far have
failed, because when run via the test, viper-mode does what one would
Author: Jim Meyering <address@hidden>
Date: Wed Oct 12 08:57:48 2016 -0700
viper-tests.el: add a test for bug #24672
diff --git a/test/lisp/emulation/viper-tests.el
index 2c63b24..85d83aa 100644
@@ -99,6 +99,19 @@ viper-test-undo-kmacro
+ "Test for bug #24672:
+Insert '#define z_b\', then change the 'z' to a parenthesis (open or closed)"
+ "#define (_b\\\n"
+ ?i ?# ?d ?e ?f ?i ?n ?e ? ?z ?_ ?b ?\\ escape
+ ?F ?z ?s ?\( escape
(ert-deftest viper-test-undo-2 ()
"Test for VI like undo behavior.
Is there some test set-up I can perform to make that test work like
what I outlined above?
- writing a test for Bug#24672 (viper mode malfunction while inserting a paren in continued cpp directive),
Jim Meyering <=