use super::should_emit_docs_section;
#[test]
fn files_with_matches_suppresses_the_document_section() {
assert!(
!should_emit_docs_section(true, false, true, false),
"--files-with-matches must print paths and nothing else"
);
}
#[test]
fn count_suppresses_the_document_section() {
assert!(
!should_emit_docs_section(true, false, false, true),
"--count must print path:count lines and nothing else"
);
}
#[test]
fn plain_query_still_gets_the_document_section() {
assert!(should_emit_docs_section(true, false, false, false));
}
#[test]
fn no_docs_and_lexical_modes_still_suppress() {
assert!(
!should_emit_docs_section(false, false, false, false),
"--no-docs"
);
assert!(
!should_emit_docs_section(true, true, false, false),
"--regex/--literal search the raw tree, not the document index"
);
}