All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fernando Ramos <greenfoo@u92.eu>
To: git@vger.kernel.org
Cc: gitster@pobox.com, davvid@gmail.com, sunshine@sunshineco.com,
	seth@eseth.com, levraiphilippeblain@gmail.com,
	rogi@skylittlesystem.org
Subject: [PATCH v3 3/3] vimdiff: integrate layout tests in the unit tests framework ('t' folder)
Date: Tue, 30 Nov 2021 21:43:33 +0100	[thread overview]
Message-ID: <20211130204333.174967-4-greenfoo@u92.eu> (raw)
In-Reply-To: <20211130204333.174967-1-greenfoo@u92.eu>

Create a new test case file for the different available merge tools.
Right now it only tests the 'mergetool.vimdiff.layout' options. Other
merge tools might be interested in adding their own tests here too.

Signed-off-by: Fernando Ramos <greenfoo@u92.eu>
---
 mergetools/vimdiff        |  2 +-
 t/t7609-mergetool--lib.sh | 17 +++++++++++++++++
 2 files changed, 18 insertions(+), 1 deletion(-)
 create mode 100755 t/t7609-mergetool--lib.sh

diff --git a/mergetools/vimdiff b/mergetools/vimdiff
index 8614253ef1..5085e4ad0e 100644
--- a/mergetools/vimdiff
+++ b/mergetools/vimdiff
@@ -552,6 +552,7 @@ merge_cmd_help() {
 	esac
 
 	return 0
+
 }
 
 
@@ -594,4 +595,3 @@ if test -n "$GIT_MERGETOOL_VIMDIFF_UNITTESTS"
 then
 	run_unit_tests
 fi
-
diff --git a/t/t7609-mergetool--lib.sh b/t/t7609-mergetool--lib.sh
new file mode 100755
index 0000000000..35cc287124
--- /dev/null
+++ b/t/t7609-mergetool--lib.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+test_description='git mergetool
+
+Testing basic merge tools options'
+
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
+
+. ./test-lib.sh
+
+test_expect_success 'mergetool --tool=vimdiff creates the expected layout' '
+	GIT_MERGETOOL_VIMDIFF_UNITTESTS=1 bash $GIT_BUILD_DIR/mergetools/vimdiff
+'
+
+test_done
+
-- 
2.34.0


  parent reply	other threads:[~2021-11-30 20:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-30 20:43 [PATCH v3 0/3] vimdiff: new implementation with layout support Fernando Ramos
2021-11-30 20:43 ` [PATCH v3 1/3] " Fernando Ramos
2021-11-30 20:43 ` [PATCH v3 2/3] vimdiff: add tool documentation Fernando Ramos
2021-12-01 21:27   ` Ævar Arnfjörð Bjarmason
2021-12-04  8:31     ` Fernando Ramos
2021-11-30 20:43 ` Fernando Ramos [this message]
2021-12-01 21:25   ` [PATCH v3 3/3] vimdiff: integrate layout tests in the unit tests framework ('t' folder) Ævar Arnfjörð Bjarmason
2021-12-01  5:03 ` [PATCH v3 0/3] vimdiff: new implementation with layout support Eric Sunshine
2021-12-01 18:49   ` Fernando Ramos

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=20211130204333.174967-4-greenfoo@u92.eu \
    --to=greenfoo@u92.eu \
    --cc=davvid@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=levraiphilippeblain@gmail.com \
    --cc=rogi@skylittlesystem.org \
    --cc=seth@eseth.com \
    --cc=sunshine@sunshineco.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.
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.