You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for(var key in keys) {
var parser = new ArgParser();
parser.addOption(key, defaultsTo: '');
var res = parser.parse(["--$key", "hasValue"]);
var value = res[key];
print('$key: $value');
}
}
What is the expected output?
upper_case: hasValue
camelCase: hasValue
camelcase: hasValue
What do you see instead?
upper_case: hasValue
camelCase:
camelcase: hasValue
The text was updated successfully, but these errors were encountered:
This comment was originally written by @butlermatt
I was going to make an attempt at this. But it appears that this has already been resolved.
In SDK build: 12784 (64-Bit Linux)
The following code works as expected:
#import('packages/args/args.dart');
void main() {
var keys = [ "upper_case", "camelCase", "camelcase" ];
var parser = new ArgParser();
for(var key in keys) {
parser.addOption(key, defaultsTo: '');
}
var res = parser.parse(['--upper_case', 'hasValue', '--camelCase', 'hasValue',
'--camelcase', 'hasValue']);
var opts = res.options;
for(var val in opts) {
print('$val: ${res[val]}');
}
}
This issue was originally filed by [email protected]
What steps will reproduce the problem?
import('dart:args');
void main() {
var keys = [ "upper_case", "camelCase", "camelcase" ];
for(var key in keys) {
var parser = new ArgParser();
parser.addOption(key, defaultsTo: '');
var res = parser.parse(["--$key", "hasValue"]);
var value = res[key];
print('$key: $value');
}
}
What is the expected output?
upper_case: hasValue
camelCase: hasValue
camelcase: hasValue
What do you see instead?
upper_case: hasValue
camelCase:
camelcase: hasValue
The text was updated successfully, but these errors were encountered: