From 84214887b90416e2590e59f0301086e9513b0350 Mon Sep 17 00:00:00 2001 From: Patrick Marks Date: Thu, 2 Apr 2020 06:48:01 -0700 Subject: [PATCH] fix formatting --- tests/subcommands.rs | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/tests/subcommands.rs b/tests/subcommands.rs index 0d687db7..e2ea757a 100644 --- a/tests/subcommands.rs +++ b/tests/subcommands.rs @@ -28,7 +28,6 @@ SUBCOMMANDS: help Prints this message or the help of the given subcommand(s) test Some help"; - static SUBCMD_ALPHA_ORDER: &str = "test 1 USAGE: @@ -155,12 +154,14 @@ fn subcommand_multiple() { #[test] fn subcommand_display_order() { - let app_subcmd_alpha_order = App::new("test") - .version("1") - .subcommands(vec![ - App::new("b1").about("blah b1").arg(Arg::with_name("test").short('t')), - App::new("a1").about("blah a1").arg(Arg::with_name("roster").short('r')), - ]); + let app_subcmd_alpha_order = App::new("test").version("1").subcommands(vec![ + App::new("b1") + .about("blah b1") + .arg(Arg::with_name("test").short('t')), + App::new("a1") + .about("blah a1") + .arg(Arg::with_name("roster").short('r')), + ]); assert!(utils::compare_output( app_subcmd_alpha_order, @@ -173,8 +174,12 @@ fn subcommand_display_order() { .version("1") .setting(clap::AppSettings::DeriveDisplayOrder) .subcommands(vec![ - App::new("b1").about("blah b1").arg(Arg::with_name("test").short('t')), - App::new("a1").about("blah a1").arg(Arg::with_name("roster").short('r')), + App::new("b1") + .about("blah b1") + .arg(Arg::with_name("test").short('t')), + App::new("a1") + .about("blah a1") + .arg(Arg::with_name("roster").short('r')), ]); assert!(utils::compare_output( @@ -185,7 +190,6 @@ fn subcommand_display_order() { )); } - #[test] fn single_alias() { let m = App::new("myprog")