|
Bugzilla – Full Text Bug Listing |
| Summary: | CommandLine::AddArgValue not working correctly | ||
|---|---|---|---|
| Product: | ns-3 | Reporter: | Gustavo J. A. M. Carneiro <gjcarneiro> |
| Component: | core | Assignee: | ns-bugs <ns-bugs> |
| Status: | RESOLVED FIXED | ||
| Severity: | minor | ||
| Priority: | P1 | ||
| Version: | pre-release | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Attachments: | patch | ||
|
Description
Gustavo J. A. M. Carneiro
2007-10-02 08:51:38 UTC
This bug is just a bug about not reporting a more friendly error about invalid input. (In reply to comment #1) > This bug is just a bug about not reporting a more friendly error about invalid > input. To me specific, what I mean is that the example command-line is erronous. It shows: ./build/debug/samples/main-default-value --loops 1 while it should show: ./build/debug/samples/main-default-value --loops=1 So, the problem is really that we do not detect an invalid syntax. As usual, I didn't mean to make this a "blocker" bug; it is merely the default severity for newly created bugs... Created attachment 74 [details]
patch
Patch to:
1. Support both --option=value and also --option value
2. Don't overwrite user variable with a undefined value when parsing fails
3. Give a warning when parsing of the value fails
The summary below sounds great
> 1. Support both --option=value and also --option value
> 2. Don't overwrite user variable with a undefined value when parsing fails
> 3. Give a warning when parsing of the value fails
It would be awesome if you could manage to add some tests which exercise these problems. If you can't, would you mind file another bug to keep track of the lack of tests for this code ?
Committed (with unit tests, and other minor tweaks) (In reply to comment #3) > As usual, I didn't mean to make this a "blocker" bug; it is merely the default > severity for newly created bugs... > I changed the default severity to normal, and added default "All" for the platform and OS fields. |