mirror of
https://github.com/cuberite/TCLAP.git
synced 2025-08-04 10:16:41 -04:00
Quick fix for ZshCompletionOutput test
The test was failing because elipsis changed from "..." to "... ". This is a quick and dirty fix and should be cleaned up. Also updated copyright notice
This commit is contained in:
parent
1a40e8f5a8
commit
7ab738957c
2
COPYING
2
COPYING
@ -1,6 +1,8 @@
|
||||
|
||||
|
||||
Copyright (c) 2003 Michael E. Smoot
|
||||
Copyright (c) 2004 Daniel Aarno
|
||||
Copyright (c) 2017 Google Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
|
@ -231,6 +231,12 @@ inline void ZshCompletionOutput::printOption(Arg* a, std::string mutex)
|
||||
if ( a->isValueRequired() )
|
||||
{
|
||||
std::string arg = a->shortID();
|
||||
// Example arg: "[-A <integer>] ... "
|
||||
size_t pos = arg.rfind(" ... ");
|
||||
if (pos != std::string::npos) {
|
||||
arg.erase(pos);
|
||||
}
|
||||
|
||||
arg.erase(0, arg.find_last_of(theDelimiter) + 1);
|
||||
if ( arg.at(arg.length()-1) == ']' )
|
||||
arg.erase(arg.length()-1);
|
||||
|
@ -1,2 +1,10 @@
|
||||
This feature appears broken!
|
||||
#compdef test25
|
||||
|
||||
# test25 version 0.99
|
||||
|
||||
_arguments -s -S \
|
||||
'*(-A --sA)'{-A,--sA}'[exist Test A]:integer' \
|
||||
'(-s --Bs -B --sB)'{-B,--sB}'[exist Test B]' \
|
||||
'(-s --Bs -B --sB)'{-s,--Bs}'[string test]:string' \
|
||||
'(-)--version[displays version information and exits]' \
|
||||
'(-)'{-h,--help}'[displays usage information and exits]'
|
||||
|
@ -5,7 +5,7 @@
|
||||
# updated
|
||||
../examples/test25 -h > tmp.out 2>&1
|
||||
|
||||
if cmp -s tmp.out $srcdir/test82.out; then
|
||||
if cmp -s tmp.out $srcdir/test85.out; then
|
||||
exit 0
|
||||
else
|
||||
exit 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user