[libcode-tidyall-perl] 277/374: test allow_repeated_push
Jonas Smedegaard
js at alioth.debian.org
Sun Sep 29 22:26:35 UTC 2013
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository libcode-tidyall-perl.
commit 7aab707efc0e22d4a6d9e4e78f6098a6a3cb4821
Author: Jonathan Swartz <swartz at pobox.com>
Date: Thu Sep 27 06:48:07 2012 -0700
test allow_repeated_push
---
lib/Code/TidyAll/t/Git.pm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/lib/Code/TidyAll/t/Git.pm b/lib/Code/TidyAll/t/Git.pm
index db44392..6e3464f 100644
--- a/lib/Code/TidyAll/t/Git.pm
+++ b/lib/Code/TidyAll/t/Git.pm
@@ -114,6 +114,28 @@ sub test_git : Tests {
$output = capture_stderr { system( "git", "push" ) };
like( $output, qr/master -> master/, "master -> master" );
$pushed->();
+
+ # Unfix file and commit
+ #
+ write_file( "$clone_dir/foo.txt", "def" );
+ run( "git", "commit", "-m", "changed", "-a" );
+ $committed->();
+
+ # Try #1: make sure we get error back
+ #
+ $unpushed->();
+ $output = capture_stderr { system( "git", "push" ) };
+ like( $output, qr/needs tidying/, "needs tidying" );
+ $unpushed->();
+
+ # Try #2: make sure we get error and repeat notification back
+ #
+ $unpushed->();
+ $output = capture_stderr { system( "git", "push" ) };
+ like( $output, qr/needs tidying/, "needs tidying" );
+ like( $output, qr/Identical push seen 2 times/, "Identical push seen 2 times" );
+ $unpushed->();
+
}
$precommit_hook_template = '#!/usr/bin/perl
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libcode-tidyall-perl.git
More information about the Pkg-perl-cvs-commits
mailing list