From: "Fabian Groffen" <grobian@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage-utils:master commit in: libq/, tests/qatom/
Date: Wed, 5 Jun 2019 13:11:40 +0000 (UTC) [thread overview]
Message-ID: <1559740191.e39cbfcefe03f6160894201df6174cec4b4e7946.grobian@gentoo> (raw)
commit: e39cbfcefe03f6160894201df6174cec4b4e7946
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 5 13:09:51 2019 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Wed Jun 5 13:09:51 2019 +0000
URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=e39cbfce
libq/atom: really fix retaining input in atom_format_r
return the start of the buffer, not the end (= empty)
add tests this time that show the bug is now fixed
Bug: https://bugs.gentoo.org/687416
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
libq/atom.c | 2 +-
tests/qatom/dotest | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/libq/atom.c b/libq/atom.c
index ae781a8..8b1b47a 100644
--- a/libq/atom.c
+++ b/libq/atom.c
@@ -646,7 +646,7 @@ atom_format_r(
fmt = strchr(p, '%');
if (fmt == NULL) {
append_buf(buf, buflen, "%s", p);
- return buf;
+ return ret;
} else if (fmt != p) {
append_buf(buf, buflen, "%.*s", (int)(fmt - p), p);
}
diff --git a/tests/qatom/dotest b/tests/qatom/dotest
index 24bd67b..c173de3 100755
--- a/tests/qatom/dotest
+++ b/tests/qatom/dotest
@@ -56,6 +56,8 @@ test f16 "media-fonts font-adobe-100dpi 1.0.3 r1" \
test f17 "games-rpg eschalon-book-1-demo 106 r1" \
-F '%{CATEGORY} %{PN} %{PV} %{PR}' \
"games-rpg/eschalon-book-1-demo-106-r1"
+test f18 "bla" -F 'bla' "cat/pkg-c" # bug #687416
+test f19 ":pkg-c-1.4" -F ':%{PN}-1.4' "cat/pkg-c" # bug #687416
# Comparison tests
test c01 "cat/pkg-123-r3 == pkg" \
next reply other threads:[~2019-06-05 13:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-05 13:11 Fabian Groffen [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-04-05 12:10 [gentoo-commits] proj/portage-utils:master commit in: libq/, tests/qatom/ Fabian Groffen
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=1559740191.e39cbfcefe03f6160894201df6174cec4b4e7946.grobian@gentoo \
--to=grobian@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox