all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jim Meyering <jim@meyering.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 24672@debbugs.gnu.org
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	[thread overview]
Message-ID: <CA+8g5KFuYDnWT4BzJtEZKYC2Ntc83ehP19r-1fsjsbswtmm=gg@mail.gmail.com> (raw)
In-Reply-To: <831sz3up7q.fsf@gnu.org>

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	other threads:[~2016-10-26 15:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-12  3:59 bug#24672: 26.0.50; viper-mode + c-mode: "ce" fails in cpp-continued stmt Jim Meyering
2016-10-26  5:09 ` writing a test for Bug#24672 (viper mode malfunction while inserting a paren in continued cpp directive) Jim Meyering
2016-10-26 11:51   ` bug#24672: " Eli Zaretskii
2016-10-26 14:33     ` Jim Meyering
2016-10-26 15:02       ` Eli Zaretskii
2016-10-26 11:52   ` Eli Zaretskii
2016-10-26 15:03   ` Eli Zaretskii
2016-10-26 15:37     ` Jim Meyering [this message]
2016-10-26  5:09 ` Jim Meyering

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CA+8g5KFuYDnWT4BzJtEZKYC2Ntc83ehP19r-1fsjsbswtmm=gg@mail.gmail.com' \
    --to=jim@meyering.net \
    --cc=24672@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.