Kevin K
e80fd4d671
tests: adds tests for AppSettings::AllowMissingPositional
2017-01-04 00:02:26 -05:00
Kevin K
2fc5acaff7
fixup! tests: adds tests for propogating values down
2017-01-02 23:10:46 -05:00
Kevin K
f967235a90
tests: massively rehauls tests for better debugging and vastly improved error messages/deduplication
2017-01-02 23:05:50 -05:00
Kevin K
c142fb544d
tests: adds tests for propogating values down
2017-01-02 23:05:50 -05:00
Kevin K
fc3800b830
tests: adds tests for wrapping meta help items
2017-01-02 16:44:40 -05:00
Kevin K
aa26a50d5c
tests: adds tests to guard against low index multiples with allow_hyphen_values failing
2017-01-02 14:34:25 -05:00
Kevin K
9d9683feb0
tests(Arg::value_terminator): adds tests for Arg::value_termintaor
2017-01-02 12:23:03 -05:00
Kevin K
12026f63d9
tests: adds tests for
2016-12-30 23:22:09 -05:00
Kevin K
25cbca4e41
tests: adds tests for
2016-12-30 22:40:28 -05:00
Kevin K
01caf84b87
tests(DisableHelpSubcommand): adds tests for AppSettings::DisableHelpSubcommand
2016-12-30 21:53:58 -05:00
Kevin K
327c514d7a
test(Options): adds a test against issue 665
2016-12-30 16:25:48 -05:00
Kevin K
3055e77ea7
tests(YAML): adds some of the new APIs to the YAML tests
2016-12-28 23:56:33 -05:00
Kevin K
60e1a3a02b
tests(Conditionally Required): adds tests for conditionally required args
2016-12-28 23:30:52 -05:00
Kevin K
eca609159a
test(Conditional Requirements): adds teste for conditional requirements
2016-12-28 23:21:40 -05:00
Kevin K
b03eff6df5
tests(Default Values If): adds tests for the new defualt_value_if[s] methods
2016-12-28 23:21:40 -05:00
Arnavion
f41ec962c2
feat(clap_app!): Support --("some-arg-name")
syntax for defining long arg names
...
Used for arg names that aren't idents.
Ref #321
2016-12-12 22:42:11 -08:00
Arnavion
9895b671cf
feat(clap_app!): Support ("some app name")
syntax for defining app names
...
Used for setting names that aren't Rust idents.
Fixes #759
2016-12-12 22:42:11 -08:00
Arnavion
79bbf57815
tests(clap_app!): Added test for clap_app! macro.
2016-12-12 22:42:11 -08:00
Kevin K
56bd25ab38
Merge branch 'master' into issue-threedots
2016-12-01 23:54:22 -05:00
Daniel Luz
b1b16d56d8
imp(Completions): adds fallbacks to Bash completions
...
With these options, in case the completion function cannot provide
suggestions, Bash will perform its default completions, based on e.g.
files, directories, and variable names. This is particularly useful for
argument values.
2016-12-01 23:27:35 -02:00
Kevin K
29e362cc19
tests: adds tests against issue 760 help message alignment
2016-12-01 18:47:20 -05:00
Kevin K
d20331b6f7
fix(Required Unless): fixes a bug where having required_unless set doesn't work when conflicts are also set
...
Closes #753
2016-11-20 12:10:14 -05:00
Kevin K
cf9d6ce5cd
refactor: refactors the internals a bit
...
Flags, Opts, and Positionals now store their internals using compartmented Base, Valued, and
Switched structs to keep the code duplication down and make it easier to maintain.
Iniside the src/app/parser.rs there have been several changes to make reasoning about the code
easier. Primarily moving related sections out of the large get_matches_with into their own
functions.
2016-11-20 14:47:03 -05:00
Kevin K
908d78eb82
tests: adds tests against issue-725 part 2
2016-11-01 23:32:26 -04:00
Kevin K
74360184fa
tests(Multiple Values): renames some tests to reduce redundancy
2016-11-01 16:25:54 -04:00
Kevin K
ac49e7bc04
tests: adds tests for low index positionals with multiple(true) set
2016-11-01 16:25:54 -04:00
Kevin K
44f6b1edbf
tests: updates conflict tests to new more precise output
2016-10-31 00:35:13 -04:00
Wim Looman
f5b577c4fe
tests: Add tests related to #706
...
Try and stress the combinations of DeriveDisplayOrder and UnifiedHelpMessage
along with propagating them to subcommands and explicitly setting a display
order.
The new tests
derive_order_subcommand_propagate
unified_help_and_derive_order_subcommand_propagate
unified_help_and_derive_order_subcommand_propagate_with_explicit_display_order
are currently failing because of bug #706 .
2016-10-26 20:47:19 +02:00
Kevin K
b94f897daf
tests(Help Message): adds tests to guard aginst multiple values throwing off alignment
2016-10-24 05:56:21 -04:00
Kevin K
e443f2d6c1
tests(AllowNegativeNumbers): adds some new tests for AllowNegativeNumbers and AllowLeadingHyphen
2016-10-21 09:42:25 -04:00
Kevin K
637d25dde3
tests: adds tests to guard against issue-688
2016-10-20 19:39:21 -04:00
Kevin K
440a21cfdc
tests: updates tests to new space counts in help messages
2016-10-20 19:39:21 -04:00
Kevin K
468baadb83
fix: fixes a bug that made determining when to auto-wrap long help messages inconsistent
...
Closes #688
2016-10-20 19:39:21 -04:00
tormol
996fc38176
docs: fix tests that fail when the "suggestions" feature is disabled
2016-10-16 11:31:12 +02:00
tormol
5778871951
style: remove the .ok()
in result.ok().expect("...")
...
clippy doesn't check doc-tests and `include!()`d files,
so there might bee more un-reported lint.
2016-10-05 23:16:22 +02:00
tormol
215677bfa7
style: remove #[allow("warning that apparently doesn't exist")]
...
I say "apparently" because it's listed on https://manishearth.github.io/rust-clippy/master/
and not as deprecated.
2016-10-05 23:15:53 +02:00
Hideyuki Tanaka
8cd120c230
Fix the behavior of require_delimiter
2016-10-04 18:40:03 -04:00
nabijaczleweli
7b7aa87ddf
tests(correctness): No longer use App::get_matches() in some places
...
Use App::get_matches_from(vec![""]) instead not to fail when flags are
passed to the test binary
Closes #676
2016-10-04 23:22:43 +02:00
Salim Afiune
905d3b9777
Fix linting errors from rustc 1.14.0
...
The new version of rustc 1.14.0-nightly (144af3e97 2016-10-02) has new
linting warnings/errors. This commit fixes them.
Signed-off-by: Salim Afiune <afiune@chef.io>
2016-10-04 12:26:51 -04:00
Salim Afiune
40d6dac973
feat(flag_aliases): Ability to alias flags
...
Added same alias funtionality for flags, now you can do:
```
Arg::with_name("flg")
.long("flag")
.short("f")
.alias("not_visible_flag")
.visible_alias("awesome_v_flag")
```
Signed-off-by: Salim Afiune <afiune@chef.io>
2016-10-04 12:26:51 -04:00
Salim Afiune
e5d9760bea
Added Arg::(visible_)alias(es) docs
...
Signed-off-by: Salim Afiune <afiune@chef.io>
2016-10-04 12:26:51 -04:00
Salim Afiune
33b5f6ef2c
feat(arg_aliases): Ability to alias arguments
...
There are some cases where you need to have an argument to have an
alias, an example could be when you depricate one option in favor of
another one.
Now you are going to be able to alias arguments as follows:
```
Arg::with_name("opt")
.long("opt")
.short("o")
.takes_value(true)
.alias("invisible")
.visible_alias("visible")
```
Closes #669
2016-10-04 12:26:51 -04:00
Kevin K
d12649fd7b
tests: adds tests for value delimiters
2016-09-18 16:01:26 -04:00
Kevin K
5c29448d54
tests(AllowLeadingHyphen): adds test issue 588 AllowLeadingHyphen not recognizing valid args
2016-09-12 23:26:49 -04:00
Kevin K
1ea9bef20d
test(Help Wrapping): adds tests for the old newline characters
2016-09-12 23:20:40 -04:00
Kevin K
4c8ae08e4c
tests(Help): adds tests for per argument hiding of possible values
2016-09-10 23:11:43 -04:00
Kevin K
9881a4a23a
tests(Value Delimiters): updates tests to new value delimiter rules
2016-09-10 18:18:43 -04:00
Kevin K
2e99e22630
Merge branch 'master' into issue-617
2016-09-07 10:45:27 -04:00
Kevin K
934094d7c5
tests: updates tests for new help wrapping rules
2016-09-07 08:42:42 -04:00
Aluísio Augusto Silva Gonçalves
b9b55a39df
imp(YAML): supports setting Arg::require_delimiter from YAML
2016-09-06 13:30:31 -03:00