1
0
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:
sharkdp
2020-03-15 14:14:01 +01:00
committed by David Peter
parent a2075b0f24
commit b611d2aef4
2 changed files with 46 additions and 0 deletions
+11
View File
@@ -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();