Skip to content

Commit 26adae1

Browse files
Fix test
1 parent cd58031 commit 26adae1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/default_value.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
use structopt::StructOpt;
22

3+
mod utils;
4+
5+
use utils::*;
6+
37
#[test]
48
fn auto_default_value() {
59
#[derive(StructOpt, PartialEq, Debug)]
@@ -9,4 +13,7 @@ fn auto_default_value() {
913
}
1014
assert_eq!(Opt { arg: 0 }, Opt::from_iter(&["test"]));
1115
assert_eq!(Opt { arg: 1 }, Opt::from_iter(&["test", "1"]));
16+
17+
let help = get_long_help::<Opt>();
18+
assert!(help.contains("[default: 0]"));
1219
}

0 commit comments

Comments
 (0)