mirror of
https://github.com/sharkdp/bat.git
synced 2025-04-15 07:10:43 +01:00
parent
2eaced4d30
commit
c4031ad65c
@ -481,4 +481,15 @@ mod tests {
|
|||||||
"Bourne Again Shell (bash)"
|
"Bourne Again Shell (bash)"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn issue_1008() {
|
||||||
|
let test = SyntaxDetectionTest::new();
|
||||||
|
|
||||||
|
assert_eq!(
|
||||||
|
test.syntax_for_file_with_content("bin/rails", "#!/usr/bin/env ruby"),
|
||||||
|
"Ruby"
|
||||||
|
);
|
||||||
|
assert_eq!(test.syntax_for_file("example.rails"), "HTML (Rails)");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -42,6 +42,11 @@ impl<'a> SyntaxMapping<'a> {
|
|||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
|
// See #1008
|
||||||
|
mapping
|
||||||
|
.insert("rails", MappingTarget::MapToUnknown)
|
||||||
|
.unwrap();
|
||||||
|
|
||||||
mapping
|
mapping
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user