File tree Expand file tree Collapse file tree
clap_complete/tests/testsuite Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -435,3 +435,30 @@ tests/examples.rs tests/snapshots tests/testsuite
435435 let actual = runtime. complete ( input, & term) . unwrap ( ) ;
436436 assert_data_eq ! ( actual, expected) ;
437437}
438+
439+ #[ test]
440+ #[ cfg( all( unix, feature = "unstable-dynamic" ) ) ]
441+ #[ cfg( feature = "unstable-shell-tests" ) ]
442+ fn complete_dynamic_tagged_options ( ) {
443+ if !common:: has_command ( CMD ) {
444+ return ;
445+ }
446+
447+ let term = completest:: Term :: new ( ) ;
448+ let mut runtime = common:: load_runtime :: < RuntimeBuilder > ( "dynamic-env" , "exhaustive" ) ;
449+
450+ let input = [
451+ "zstyle ':completion:*:descriptions' format '%d'" ,
452+ "exhaustive -\t \t " ,
453+ ] . join ( "\n " ) ;
454+
455+ let expected = snapbox:: str![ [ r#"
456+ % zstyle ':completion:*:descriptions' format '%d'
457+ % exhaustive -
458+ --generate -- generate
459+ -h -- Print help
460+ --empty-choice
461+ "# ] ] ;
462+ let actual = runtime. complete ( & input, & term) . unwrap ( ) ;
463+ assert_data_eq ! ( actual, expected) ;
464+ }
You can’t perform that action at this time.
0 commit comments