[Issue 13317] New: std.getopt: endOfOptions broken when it doesn't look like an option
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Aug 17 16:13:19 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=13317
Issue ID: 13317
Summary: std.getopt: endOfOptions broken when it doesn't look
like an option
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: Phobos
Assignee: nobody at puremagic.com
Reporter: nilsbossung at googlemail.com
---
cat > test.d << code
import std.getopt;
void main()
{
std.getopt.endOfOptions = "endofoptions";
string[] args = ["program", "endofoptions", "--option"];
bool b = false;
getopt(args, "option", &b);
assert(!b);
assert(args == ["program", "--option"]);
}
code
dmd test.d
./test
---
std.getopt.GetOptException@/home/nils/d/dmd/dmd2/linux/bin64/../../src/phobos/std/getopt.d(597):
Unrecognized option --option
---
Going to add the fix for this to the pull request I have open for 13315 and
13316: https://github.com/D-Programming-Language/phobos/pull/2433
--
More information about the Digitalmars-d-bugs
mailing list