use gxf2bed::detect::{detect_input_kind, Compression, InputFormat};
use std::path::Path;
#[test]
fn detect_plain_gtf() {
let kind = detect_input_kind(Path::new("sample.gtf")).unwrap();
assert_eq!(kind.format, InputFormat::Gtf);
assert_eq!(kind.compression, Compression::None);
}
#[test]
fn detect_gff3_gz() {
let kind = detect_input_kind(Path::new("sample.gff3.gz")).unwrap();
assert_eq!(kind.format, InputFormat::Gff);
assert_eq!(kind.compression, Compression::Gzip);
}
#[test]
fn detect_gtf_zstd() {
let kind = detect_input_kind(Path::new("sample.gtf.zst")).unwrap();
assert_eq!(kind.format, InputFormat::Gtf);
assert_eq!(kind.compression, Compression::Zstd);
}
#[test]
fn detect_rejects_unknown() {
assert!(detect_input_kind(Path::new("sample.txt")).is_err());
}