Skip to content

Commit 8a66dbf

Browse files
committed
test(complete): Add more native cases
1 parent 76465cf commit 8a66dbf

1 file changed

Lines changed: 19 additions & 2 deletions

File tree

clap_complete/tests/testsuite/engine.rs

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -789,9 +789,7 @@ pos_1_b
789789
pos_1_c
790790
"#]]
791791
);
792-
793792
assert_data_eq!(complete!(cmd, "pos_1_a --[TAB]"), snapbox::str![""]);
794-
795793
assert_data_eq!(
796794
complete!(cmd, "pos_1_a --format [TAB]"),
797795
snapbox::str![[r#"
@@ -812,13 +810,32 @@ pos_1_c
812810
"#]]
813811
);
814812

813+
assert_data_eq!(
814+
complete!(cmd, "pos_1_a pos_1_b [TAB]"),
815+
snapbox::str![[r#"
816+
pos_1_a
817+
pos_1_b
818+
pos_1_c
819+
--format
820+
--help Print help
821+
"#]]
822+
);
815823
assert_data_eq!(
816824
complete!(cmd, "pos_1_a pos_1_b --[TAB]"),
817825
snapbox::str![[r#"
818826
--format
819827
--help Print help
820828
"#]]
821829
);
830+
assert_data_eq!(
831+
complete!(cmd, "pos_1_a pos_1_b --format [TAB]"),
832+
snapbox::str![[r#"
833+
json
834+
yaml
835+
toml
836+
"#]]
837+
);
838+
822839
assert_data_eq!(
823840
complete!(cmd, "pos_1_a pos_1_b --format json [TAB]"),
824841
snapbox::str![[r#"

0 commit comments

Comments
 (0)