bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#24672: writing a test for Bug#24672 (viper mode malfunction while in


From: Jim Meyering
Subject: bug#24672: writing a test for Bug#24672 (viper mode malfunction while inserting a paren in continued cpp directive)
Date: Wed, 26 Oct 2016 08:37:26 -0700

On Wed, Oct 26, 2016 at 8:03 AM, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Jim Meyering <jim@meyering.net>
>> Date: Tue, 25 Oct 2016 22:09:40 -0700
>>
>> +(ert-deftest viper-test-insert-paren-on-cpp-continued-line()
>> +  "Test for bug #24672:
>> +Insert '#define z_b\', then change the 'z' to a parenthesis (open or 
>> closed)"
>> +  (should
>> +   (equal
>> +    "#define (_b\\\n"
>> +    (viper-test-undo-kmacro
>> +     [
>> +      ?i ?# ?d ?e ?f ?i ?n ?e ?  ?z ?_ ?b ?\\ escape
>> +         ?F ?z ?s ?\( escape
>> +         ])
>> +    )))
>> +
>
> Is there a reason why the test uses 'F', but the recipe you posted
> uses 'f' (lower-case)?  (I know nothing about vi commands.)

The test case constructs it "live", so after inserting the text into
the buffer, point is at the end of the line. From there, "Fz" (search
backwards for "z") is appropriate. My command-line example opens a
file with that contents already there, and with point at the beginning
of the line, so there I used "fz" search forwards for "z").





reply via email to

[Prev in Thread] Current Thread [Next in Thread]