Standardizing on "Usage:" across nodes and adding trivial test for rosrebag.
This commit is contained in:
parent
a732065b46
commit
a63f0729a2
|
@ -42,7 +42,7 @@ using namespace ros;
|
|||
|
||||
void print_usage()
|
||||
{
|
||||
fprintf (stderr, "USAGE: rosplay [options] BAG1 [BAG2]\n");
|
||||
fprintf (stderr, "Usage: rosplay [options] BAG1 [BAG2]\n");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -447,7 +447,7 @@ def rebag_main():
|
|||
return eval(expr)
|
||||
return eval_fn
|
||||
|
||||
parser = optparse.OptionParser(usage="""usage: %prog in.bag out.bag filter-expression
|
||||
parser = optparse.OptionParser(usage="""Usage: %prog in.bag out.bag filter-expression
|
||||
|
||||
filter-expression can be any Python-legal expression.
|
||||
The following variables are available:
|
||||
|
|
|
@ -78,7 +78,7 @@ boost::condition_variable_any g_queue_condition;
|
|||
|
||||
//! Helper function to print executable usage
|
||||
void print_usage() {
|
||||
fprintf (stderr, "USAGE: rosrecord [options] TOPIC1 [TOPIC2 TOPIC3...]\n"
|
||||
fprintf (stderr, "Usage: rosrecord [options] TOPIC1 [TOPIC2 TOPIC3...]\n"
|
||||
" rosrecord logs ROS message data to a file.\n"
|
||||
);
|
||||
}
|
||||
|
|
|
@ -60,6 +60,9 @@ class TestRosrecordOffline(unittest.TestCase):
|
|||
def test_rosplay_help(self):
|
||||
self.do_test_help('rosplay');
|
||||
|
||||
def test_rosrebag_help(self):
|
||||
self.do_test_help('rosrebag');
|
||||
|
||||
def test_rosrecord_pkg_help(self):
|
||||
self.do_test_help('rosrun rosrecord rosrecord');
|
||||
|
||||
|
@ -69,7 +72,7 @@ class TestRosrecordOffline(unittest.TestCase):
|
|||
def do_test_help(self, cmd):
|
||||
rosrecord = Popen(cmd.split() + ['-h'], stdout=PIPE, stderr=PIPE)
|
||||
output = rosrecord.communicate()
|
||||
self.assert_('USAGE' in output[0] or 'USAGE' in output[1])
|
||||
self.assert_('Usage:' in output[0] or 'Usage:' in output[1])
|
||||
|
||||
if __name__ == '__main__':
|
||||
rostest.unitrun('rosrecord', NAME, TestRosrecordOffline, sys.argv, coverage_packages=[])
|
||||
|
|
Loading…
Reference in New Issue