git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Philip Oakley <philipoakley@iee.org>
To: Derrick Stolee <stolee@gmail.com>,
	"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: Git Test Coverage Report (Thursday, June 6 2019)
Date: Sat, 8 Jun 2019 23:15:56 +0100	[thread overview]
Message-ID: <f28dd5b1-fda8-cf51-5582-067a7d2c2472@iee.org> (raw)
In-Reply-To: <396091fc-5572-19a5-4f18-61c258590dd5@gmail.com>

Hi Stollee

On 07/06/2019 02:19, Derrick Stolee wrote:
> Here is today's test coverage report.
>
> Thanks,
> -Stolee
>
> [1] https://derrickstolee.github.io/git-test-coverage/reports/2019-06-06.htm
> [2] https://derrickstolee.github.io/git-test-coverage/reports/2019-06-06.txt
>
> ---
>
> pu	4f91bbec8a3cc2fff435fb3dbb0dfa5f9d223141
> jch	e1895a3c3b1fef6d1bc80251d09598e219d3908d
> next	ee3066bb6536c68f973b3c0ffaaa13f4bfda5ea3
> master	74583d89127e21255c12dd3c8a3bf60b497d7d03
> master@{1}	aa25c82427ae70aebf3b8f970f2afd54e9a2a8c6
>
>
> Uncovered code in 'pu' not in 'jch'
> --------------------------------------------------------
>
> [snip]
>
>
> Uncovered code in 'jch' not in 'next'
> --------------------------------------------------------
>
> builtin/branch.c
> 1fde99cf 841) die(_("The -a, and -r, options to 'git branch' do not take a branch name.\n"
>
> [nip]
>
> Commits introducting uncovered code:
> ...
> Philip Oakley	1fde99cf doc branch: provide examples for listing remote tracking branches
> [snip rest]

The change was just a change to the die() message, but was not tested 
previously.

I've guessed that t3203 would be the right place for an extra test which 
I've hacked (but not yet tested) as

---
phili@Philip-Win10 MINGW64 /usr/src/git (branch-patterns-v2)
$ git show -1
commit d5a799d8833b0ae195915eefd5365f3fc4c7c0a4 (HEAD -> 
branch-patterns-v2, my/branch-patterns-v2)
Author: Philip Oakley <philipoakley@iee.org>
Date:   Sat Jun 8 22:50:06 2019 +0100

     t3203-branch-output: test -a & -r pattern options

     Users may wrongly use the -r and -a options with a branch pattern when
     looking for a remote tracking branch. Test that we fail for that 
misuse.

     Signed-off-by: Philip Oakley <philipoakley@iee.org>

diff --git a/t/t3203-branch-output.sh b/t/t3203-branch-output.sh
index ee6787614c..e78bd1c56d 100755
--- a/t/t3203-branch-output.sh
+++ b/t/t3203-branch-output.sh
@@ -264,4 +264,9 @@ test_expect_success '--color overrides auto-color' '
         test_cmp expect.color actual
  '

+test_expect_success '-a & -r options do not take a branch name, without 
--list' '
+       test_must_fail git branch -a HEAD
+       test_must_fail git branch -r HEAD
+'
+
  test_done
---
https://github.com/PhilipOakley/git/commit/d5a799d8833b0ae195915eefd5365f3fc4c7c0a4

Not sure if that's the right way to do it (Its my first proper try at 
tests themselves..)

I'm going to be away for about a week with only intermittent internet 
hence the unfinished reply.
--
Philip

      parent reply	other threads:[~2019-06-08 22:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-07  1:19 Git Test Coverage Report (Thursday, June 6 2019) Derrick Stolee
2019-06-07 14:43 ` Derrick Stolee
2019-06-08 22:15 ` Philip Oakley [this message]

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=f28dd5b1-fda8-cf51-5582-067a7d2c2472@iee.org \
    --to=philipoakley@iee.org \
    --cc=git@vger.kernel.org \
    --cc=stolee@gmail.com \
    /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 public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).