[PATCH] tests: add test-help-verbose.t
timeless
timeless at mozdev.org
Thu Apr 7 04:36:39 UTC 2016
# HG changeset patch
# User timeless <timeless at mozdev.org>
# Date 1453445322 0
# Fri Jan 22 06:48:42 2016 +0000
# Node ID a35384e303fe4e09730377b216dae353f95a10e3
# Parent ea86cdcd9b50bf38c6b9dd7bbaa04b9c8cc0aefb
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,28 @@
+#require slow
+
+look for outliers in command help
+collect all extensions
+
+ $ HGE=`hg help extensions | \
+ > sed -n 's/^ \([a-z][^ ]*\).*/ --config extensions.\1=/p'`
+
+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 | head `grep -n '^options' help |sed -e 's/:.*//;s/^/-n /'` | \
+ > egrep '^ |^$' | \
+ > awk -v RS="\n\n" \
+ > '/^ [a-zA-Z].*[a-zA-Z]\s*$/ { print }' | \
+ > egrep '.' && echo $c: $PUNCT
+ > done; true
More information about the Mercurial-devel
mailing list