diff options
author | Jiang Xin <worldhello.net@gmail.com> | 2020-11-11 11:32:00 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-11-11 20:46:55 (GMT) |
commit | cf3d868f353c4a5a9ecf4fbc2a44960671ba59cb (patch) | |
tree | 9084aee29e86c40f6bdc082d7044f2f993e73391 /t/t5411/test-0000-standard-git-push.sh | |
parent | 5d5f4ea30def2ac765c5517f768366524768c110 (diff) | |
download | git-cf3d868f353c4a5a9ecf4fbc2a44960671ba59cb.zip git-cf3d868f353c4a5a9ecf4fbc2a44960671ba59cb.tar.gz git-cf3d868f353c4a5a9ecf4fbc2a44960671ba59cb.tar.bz2 |
t5411: new helper filter_out_user_friendly_and_stable_output
New helper `filter_out_user_friendly_and_stable_output` will call
common helpr function `make_user_friendly_and_stable_output` and use
additional arguments to filter out messages for specific test cases.
Suggested-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jiang Xin <zhiyou.jx@alibaba-inc.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5411/test-0000-standard-git-push.sh')
-rw-r--r-- | t/t5411/test-0000-standard-git-push.sh | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/t/t5411/test-0000-standard-git-push.sh b/t/t5411/test-0000-standard-git-push.sh index 2b04b49..47b058a 100644 --- a/t/t5411/test-0000-standard-git-push.sh +++ b/t/t5411/test-0000-standard-git-push.sh @@ -36,11 +36,10 @@ test_expect_success "git-push --atomic ($PROTOCOL)" ' main \ $B:refs/heads/next \ >out 2>&1 && - make_user_friendly_and_stable_output <out | - sed -n \ - -e "/^To / { s/ */ /g; p; }" \ - -e "/^ ! / { s/ */ /g; p; }" \ - >actual && + filter_out_user_friendly_and_stable_output \ + -e "/^To / { p; }" \ + -e "/^ ! / { p; }" \ + <out >actual && cat >expect <<-EOF && To <URL/of/upstream.git> ! [rejected] main -> main (non-fast-forward) |