git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v3 3/3] vimdiff: integrate layout tests in the unit tests framework ('t' folder)

From
Fernando Ramos <greenfoo@u92.eu>
Date
Nov 30, 2021, 20:43 UTC
Message-ID
<20211130204333.174967-4-greenfoo@u92.eu>
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
Previous: Fernando RamosNext: Ævar Arnfjörð Bjarmason
Message 6 of 9 in “vimdiff: new implementation with layout support”
  1. 0/3 vimdiff: new implementation with layout supportFernando Ramos, Nov 30, 2021
  2. 1/3 vimdiff: new implementation with layout supportFernando Ramos, Nov 30, 2021
  3. 2/3 vimdiff: add tool documentationFernando Ramos, Nov 30, 2021
  4. Ævar Arnfjörð BjarmasonDec 1, 2021
  5. Fernando RamosDec 4, 2021
  6. 3/3 vimdiff: integrate layout tests in the unit tests framework ('t' folder)Fernando Ramos, Nov 30, 2021
  7. Ævar Arnfjörð BjarmasonDec 1, 2021
  8. Eric SunshineDec 1, 2021
  9. Fernando RamosDec 1, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.