lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi] PATCH: fix "--help" for the GUI test


From: Vadim Zeitlin
Subject: [lmi] PATCH: fix "--help" for the GUI test
Date: Mon, 17 Nov 2014 02:42:36 +0100

On Sun, 09 Nov 2014 02:20:08 +0000 Greg Chicares <address@hidden> wrote:

GC> BTW, './wx_test.exe --help' doesn't seem to DTRT. I think it
GC> should mention '--help' and '--data_path', but not the other two
GC> options it shows now; and '--test' and '--list' should be added
GC> along with any new options we add. I'm guessing that this won't
GC> be too hard to do by analogy with Skeleton::ProcessCommandLine(),
GC> but tell me if I'm wrong.

 I'm not sure how to use getopt library to parse and remove just some
options while letting Skeleton::ProcessCommandLine() deal with the rest of
them. I'd also like to avoid duplicating the description of the options
understood by the latter in the test, they will fatally get out of sync
with time, so if we really want to do this, I'd strongly argue for
refactoring Skeleton first and making "long_options" available to the
derived classes, e.g. via some simple accessor function.

 But in the meanwhile, and to avoid more changes to the main application,
what do you think about the simple attached patch? It just intercepts
"--help" at the GUI test level and gives a simple usage message for it.

 As an aside, isn't it surprising to see "untimely warning" in the message
box displaying usage text? It's anything but untimely, as it's given in
direct response to the users request, and it's not really a warning
neither...

 Please let me know if this simple patch is acceptable or if you want to
use getopt instead of this manual command line parsing code in the test.

 TIA,
VZ

Attachment: 0001-Give-correct-usage-message-if-the-GUI-test-is-ran-wi.patch
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]