[PATCH 7 of 7] tests: add test-help-verbose.t
timeless
timeless at mozdev.org
Mon Apr 4 05:31:33 EDT 2016
# HG changeset patch
# User timeless <timeless at mozdev.org>
# Date 1453445322 0
# Fri Jan 22 06:48:42 2016 +0000
# Node ID 03c0e3768ce68c7939429684d1f3b8b277ef8f97
# Parent 3b0f25d82ea78c185b5b67a098d8adf58e3da2ba
tests: add test-help-verbose.t
Check help for each command
diff --git a/tests/test-help-verbose.t b/tests/test-help-verbose.t
new file mode 100644
--- /dev/null
+++ b/tests/test-help-verbose.t
@@ -0,0 +1,27 @@
+#require slow
+
+look for outliers in command help
+collect all extensions
+
+ $ HGE=`hg help extensions | \
+ > perl -ne 'chomp; next unless s/^ ([a-z]\S*).*/ --config extensions.$1=/; print'`
+ $ HGE="$HGE --config extensions.show=/home/timeless/hg/hg-experimental/show.py "
+
+collect all commands
+
+ $ HGC=`hg $HGE debugcomplete 2>/dev/null`
+
+ $ FIRST='first line description of commands should not be Sentence cased'
+ $ FLAGS='help for flags should not be Sentence cased'
+ $ BADHG='improper :hg: escape'
+ $ PUNCT='paragraph should end with punctuation'
+
+ $ for c in $HGC;
+ > do hg $HGE help -c $c 2>/dev/null > help;
+ > cat help | head -3 | tail -1 | egrep '/^[A-Z]/;' && echo $c: $FIRST
+ > cat help | egrep '^ -'| egrep '[ +]. [A-Z]' && echo $c: $FLAGS
+ > cat help | grep ":hg'" && echo $c: $BADHG
+ > cat help | perl -ne 'if ($a==undef) {next unless /^ /; $a=1; $/="\n\n"; next }'\
+ > ' last if /(?:^|\n)options.*:/; print ">$_<" if /\n [a-zA-Z].*[a-zA-Z]\s*$/;' |\
+ > egrep '.' && echo $c: $PUNCT
+ > done; true
More information about the Mercurial-devel
mailing list