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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>
---
 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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux