1mod common; 2 3#[test] 4fn basic() { 5 let name = "my-app"; 6 let cmd = common::basic_command(name); 7 common::assert_matches_path( 8 "tests/snapshots/basic.fig.js", 9 clap_complete_fig::Fig, 10 cmd, 11 name, 12 ); 13} 14 15#[test] 16fn feature_sample() { 17 let name = "my-app"; 18 let cmd = common::feature_sample_command(name); 19 common::assert_matches_path( 20 "tests/snapshots/feature_sample.fig.js", 21 clap_complete_fig::Fig, 22 cmd, 23 name, 24 ); 25} 26 27#[test] 28fn special_commands() { 29 let name = "my-app"; 30 let cmd = common::special_commands_command(name); 31 common::assert_matches_path( 32 "tests/snapshots/special_commands.fig.js", 33 clap_complete_fig::Fig, 34 cmd, 35 name, 36 ); 37} 38 39#[test] 40fn quoting() { 41 let name = "my-app"; 42 let cmd = common::quoting_command(name); 43 common::assert_matches_path( 44 "tests/snapshots/quoting.fig.js", 45 clap_complete_fig::Fig, 46 cmd, 47 name, 48 ); 49} 50 51#[test] 52fn aliases() { 53 let name = "my-app"; 54 let cmd = common::aliases_command(name); 55 common::assert_matches_path( 56 "tests/snapshots/aliases.fig.js", 57 clap_complete_fig::Fig, 58 cmd, 59 name, 60 ); 61} 62 63#[test] 64fn sub_subcommands() { 65 let name = "my-app"; 66 let cmd = common::sub_subcommands_command(name); 67 common::assert_matches_path( 68 "tests/snapshots/sub_subcommands.fig.js", 69 clap_complete_fig::Fig, 70 cmd, 71 name, 72 ); 73} 74 75#[test] 76fn value_hint() { 77 let name = "my-app"; 78 let cmd = common::value_hint_command(name); 79 common::assert_matches_path( 80 "tests/snapshots/value_hint.fig.js", 81 clap_complete_fig::Fig, 82 cmd, 83 name, 84 ); 85} 86