Source: stgit
Version: 0.19-1
Severity: normal
Tags: patch
Dear Maintainer,
One of the Debian changes (debian/patches/*) disables part of the test
suite.
Please consider the following patch so the entire test suite runs. It
deletes debian/patches/disable_interactive_test and extends
debian/patches/use_editor_as_default to also update the test suite as
needed. The net result is that t3300-edit.sh now runs.
[[[
diff --git a/debian/patches/use_editor_as_default
b/debian/patches/use_editor_as_default
index f941073..65d96cb 100644
--- a/debian/patches/use_editor_as_default
+++ b/debian/patches/use_editor_as_default
@@ -9,8 +9,6 @@ Last-Update: 2014-03-26
stgit/utils.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/stgit/utils.py b/stgit/utils.py
-index cdcc4a9..fbd79a2 100644
--- a/stgit/utils.py
+++ b/stgit/utils.py
@@ -176,7 +176,7 @@ def get_editor():
@@ -22,3 +20,38 @@ index cdcc4a9..fbd79a2 100644
if editor:
return editor
+--- a/t/t3300-edit.sh
++++ b/t/t3300-edit.sh
+@@ -87,7 +87,7 @@ test_expect_success 'Save template to st
+ # 3. core.editor
+ # 4. VISUAL
+ # 5. EDITOR
+-# 6. vi
++# 6. editor
+
+ mkeditor ()
+ {
+@@ -98,11 +98,11 @@ EOF
+ chmod a+x "$1"
+ }
+
+-mkeditor vi
+-test_expect_success 'Edit commit message interactively (vi)' '
++mkeditor editor
++test_expect_success 'Edit commit message interactively (editor)' '
+ m=$(msg HEAD) &&
+ PATH=.:$PATH stg edit p2 &&
+- test "$(msg HEAD)" = "$m/vi"
++ test "$(msg HEAD)" = "$m/editor"
+ '
+
+ mkeditor e1
+@@ -143,7 +143,7 @@ test_expect_success 'Edit commit message
+ test "$(msg HEAD)" = "$m/e5"
+ '
+
+-rm -f vi e1 e2 e3 e4 e5
++rm -f editor e1 e2 e3 e4 e5
+ git config --unset core.editor
+ git config --unset stgit.editor
+
diff --git a/debian/patches/series b/debian/patches/series
index 7b014e7..fd89c42 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,3 @@
use_editor_as_default
stg-gitk_bashism
-disable_interactive_test
Avoid-the-git-error-messages-when-running-stg-outside-of-.patch
diff --git a/debian/patches/disable_interactive_test
b/debian/patches/disable_interactive_test
deleted file mode 100644
index 12a6a5b..0000000
--- a/debian/patches/disable_interactive_test
+++ /dev/null
@@ -1,27 +0,0 @@
-From: Maximiliano Curia <[email protected]>
-Date: Sat, 2 Sep 2017 14:06:57 +0200
-Subject: Disable test calling editor
-
-Upstream uses vi as the default editor, while the debian packages default to
-the editor command, thus the different behavior.
-
-Author: Maximiliano Curia <[email protected]>
-Forwarded: not-needed
-Last-Update: 2014-03-26
----
- t/t3300-edit.sh | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/t/t3300-edit.sh b/t/t3300-edit.sh
-index 61baab8..392e1f3 100755
---- a/t/t3300-edit.sh
-+++ b/t/t3300-edit.sh
-@@ -2,6 +2,8 @@
- test_description='Test "stg edit"'
-
- . ./test-lib.sh
-+test_done
-+exit
-
- test_expect_success 'Setup' '
- printf "000\n111\n222\n333\n" >> foo &&
]]]
Cheers,
Daniel