Add assert to make doc test fails.

This commit is contained in:
Donough Liu 2021-01-19 02:36:16 +08:00
parent 50fb4ca63d
commit acdb94c1a5

View file

@ -710,6 +710,7 @@ impl ArgMatches {
/// // clap sees the above as 'myapp -o val1 val2 val3'
/// // ^0 ^1 ^2 ^3 ^4
/// assert_eq!(m.index_of("option"), Some(2));
/// assert_eq!(m.indices_of("option").unwrap().collect::<Vec<_>>(), &[2, 3, 4]);
/// ```
/// [`ArgMatches`]: ./struct.ArgMatches.html
/// [delimiter]: ./struct.Arg.html#method.value_delimiter