<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">Index: subversion/tests/cmdline/getopt_tests_data/svn_help_stdout
===================================================================
--- subversion/tests/cmdline/getopt_tests_data/svn_help_stdout	(revision 20304)
+++ subversion/tests/cmdline/getopt_tests_data/svn_help_stdout	(working copy)
@@ -1,44 +0,0 @@
-usage: svn &lt;subcommand&gt; [options] [args]
-       svn --version [--quiet]
-Subversion command-line client, version X.Y.Z.
-Type 'svn help &lt;subcommand&gt;' for help on a specific subcommand.
-Type 'svn --version' to see the program version and RA modules.
-
-Most subcommands take file and/or directory arguments, recursing
-on the directories.  If no arguments are supplied to such a
-command, it recurses on the current directory (inclusive) by default.
-
-Available subcommands:
-   add
-   blame (praise, annotate, ann)
-   cat
-   checkout (co)
-   cleanup
-   commit (ci)
-   copy (cp)
-   delete (del, remove, rm)
-   diff (di)
-   export
-   help (?, h)
-   import
-   info
-   list (ls)
-   lock
-   log
-   merge
-   mkdir
-   move (mv, rename, ren)
-   propdel (pdel, pd)
-   propedit (pedit, pe)
-   propget (pget, pg)
-   proplist (plist, pl)
-   propset (pset, ps)
-   resolved
-   revert
-   status (stat, st)
-   switch (sw)
-   unlock
-   update (up)
-
-Subversion is a tool for version control.
-For additional information, see http://subversion.tigris.org/
Index: subversion/tests/cmdline/getopt_tests_data/svn--help_stdout
===================================================================
--- subversion/tests/cmdline/getopt_tests_data/svn--help_stdout	(revision 20304)
+++ subversion/tests/cmdline/getopt_tests_data/svn--help_stdout	(working copy)
@@ -1,44 +0,0 @@
-usage: svn &lt;subcommand&gt; [options] [args]
-       svn --version [--quiet]
-Subversion command-line client, version X.Y.Z.
-Type 'svn help &lt;subcommand&gt;' for help on a specific subcommand.
-Type 'svn --version' to see the program version and RA modules.
-
-Most subcommands take file and/or directory arguments, recursing
-on the directories.  If no arguments are supplied to such a
-command, it recurses on the current directory (inclusive) by default.
-
-Available subcommands:
-   add
-   blame (praise, annotate, ann)
-   cat
-   checkout (co)
-   cleanup
-   commit (ci)
-   copy (cp)
-   delete (del, remove, rm)
-   diff (di)
-   export
-   help (?, h)
-   import
-   info
-   list (ls)
-   lock
-   log
-   merge
-   mkdir
-   move (mv, rename, ren)
-   propdel (pdel, pd)
-   propedit (pedit, pe)
-   propget (pget, pg)
-   proplist (plist, pl)
-   propset (pset, ps)
-   resolved
-   revert
-   status (stat, st)
-   switch (sw)
-   unlock
-   update (up)
-
-Subversion is a tool for version control.
-For additional information, see http://subversion.tigris.org/
Index: subversion/tests/cmdline/getopt_tests.py
===================================================================
--- subversion/tests/cmdline/getopt_tests.py	(revision 20304)
+++ subversion/tests/cmdline/getopt_tests.py	(working copy)
@@ -83,6 +83,14 @@
                   'Subversion command-line client, version X.Y.Z.'),
                 ]
 
+# This is a list of lines to match in 'svn --help' and 'svn help'.
+help_lines_res = [
+                 re.compile(r'^usage:(.*)$'),
+                 re.compile(r'^\s+add$'),
+                 re.compile(r'^\s+blame(.*)$'),
+                 re.compile(r'^\s+cat$'),
+                ]
+
 def process_lines(lines):
   "delete lines that should not be compared and search and replace the rest"
   output = [ ]
@@ -152,6 +160,30 @@
     print "====="
     raise svntest.Failure
 
+def run__help_test(sbox, *varargs):
+  "run svn --help and match specific lines"
+
+  ### no need to use sbox.build() -- we don't need a repos or working copy
+  ### for these tests.
+
+  stdout, stderr = apply(svntest.main.run_command,
+                         (svntest.main.svn_binary, 1, 0)
+                         + varargs)
+
+  match_lines = 0
+  for line in stdout:
+    for help_re in help_lines_res:
+      if help_re.match(line):
+        match_lines = match_lines + 1
+
+  if match_lines != len(help_lines_res):
+    raise svntest.Failure
+
+def run_help_test(sbox, *varargs):
+  "run svn help and match specific lines"
+
+  run__help_test(sbox, *varargs)
+
 def getopt_no_args(sbox):
   "run svn with no arguments"
   run_one_test(sbox, 'svn')
@@ -166,11 +198,11 @@
 
 def getopt__help(sbox):
   "run svn --help"
-  run_one_test(sbox, 'svn--help', '--help')
+  run__help_test(sbox, '--help')
 
 def getopt_help(sbox):
   "run svn help"
-  run_one_test(sbox, 'svn_help', 'help')
+  run_help_test(sbox, 'help')
 
 def getopt_help_log_switch(sbox):
   "run svn help log switch"
</pre></body></html>