threads / patch / 36689

patchrebase --keep-empty -i: add test

Subject: [PATCH] rebase --keep-empty -i: add test

## tl;dr

2 messages between May 18, 2014 and May 18, 2014. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

Michael S. Tsirkin· May 18, 2014, 20:28 UTC · lore

There's some special code in rebase -i to deal with --keep-empty. Add test for this combination.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 t/t3404-rebase-interactive.sh | 9 +++++++++
 1 file changed, 9 insertions(+)
Show changes to t/t3404-rebase-interactive.sh +8 −0
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index c0023a5..3b1b863 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -67,6 +67,14 @@ test_expect_success 'setup' '
 SHELL=
 export SHELL
 
+test_expect_success 'rebase --keep-empty' '
+	git checkout -b emptybranch master &&
+	git commit --allow-empty -m "empty" &&
+	git rebase --keep-empty -i HEAD~2 &&
+	git log --oneline >actual &&
+	test_line_count = 6 actual
+'
+
 test_expect_success 'rebase -i with the exec command' '
 	git checkout master &&
 	(
-- 
MST
Neil Horman· May 18, 2014, 23:18 UTC · re: Michael S. Tsirkin · lore

Re: [PATCH] rebase --keep-empty -i: add test

On Sun, May 18, 2014 at 11:28:39PM +0300, Michael S. Tsirkin wrote:
Show 5 quoted lines
> There's some special code in rebase -i to deal
> with --keep-empty.
> Add test for this combination.
> 
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Show 26 quoted lines
> ---
>  t/t3404-rebase-interactive.sh | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
> index c0023a5..3b1b863 100755
> --- a/t/t3404-rebase-interactive.sh
> +++ b/t/t3404-rebase-interactive.sh
> @@ -67,6 +67,14 @@ test_expect_success 'setup' '
>  SHELL=
>  export SHELL
>  
> +test_expect_success 'rebase --keep-empty' '
> +	git checkout -b emptybranch master &&
> +	git commit --allow-empty -m "empty" &&
> +	git rebase --keep-empty -i HEAD~2 &&
> +	git log --oneline >actual &&
> +	test_line_count = 6 actual
> +'
> +
>  test_expect_success 'rebase -i with the exec command' '
>  	git checkout master &&
>  	(
> -- 
> MST
> 

← back to recent threads