mirror of
https://github.com/sharkdp/bat
synced 2026-08-02 18:41:42 +00:00
Add no-duplicate-extensions unit test
This commit is contained in:
@@ -57,6 +57,17 @@ fn syntax_detection_basic() {
|
||||
assert_eq!(test.syntax_name("PKGBUILD"), "Bourne Again Shell (bash)");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn syntax_detection_well_defined_mapping_for_duplicate_extensions() {
|
||||
let test = SyntaxDetectionTest::new();
|
||||
|
||||
assert_eq!(test.syntax_name("test.sass"), "Sass");
|
||||
// TODO: make these tests pass:
|
||||
// assert_eq!(test.syntax_name("test.h"), "C");
|
||||
// assert_eq!(test.syntax_name("test.hs"), "Haskell (Improved)");
|
||||
// assert_eq!(test.syntax_name("test.js"), "JavaScript (Babel)");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn syntax_detection_first_line() {
|
||||
let test = SyntaxDetectionTest::new();
|
||||
|
||||
Reference in New Issue
Block a user