Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
CreepySkeleton committed Dec 28, 2019
1 parent cd58031 commit 26adae1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/default_value.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
use structopt::StructOpt;

mod utils;

use utils::*;

#[test]
fn auto_default_value() {
#[derive(StructOpt, PartialEq, Debug)]
Expand All @@ -9,4 +13,7 @@ fn auto_default_value() {
}
assert_eq!(Opt { arg: 0 }, Opt::from_iter(&["test"]));
assert_eq!(Opt { arg: 1 }, Opt::from_iter(&["test", "1"]));

let help = get_long_help::<Opt>();
assert!(help.contains("[default: 0]"));
}

0 comments on commit 26adae1

Please sign in to comment.