mirror of
https://github.com/sharkdp/bat
synced 2024-11-23 04:13:11 +00:00
Add do-not-panic! regression tests
This commit is contained in:
parent
c386cb35fb
commit
03c2281828
6 changed files with 33 additions and 0 deletions
3
tests/examples/regression_tests/issue_190.md
Normal file
3
tests/examples/regression_tests/issue_190.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
```javascript
|
||||
var test = "boom";
|
||||
```
|
4
tests/examples/regression_tests/issue_28.md
Normal file
4
tests/examples/regression_tests/issue_28.md
Normal file
|
@ -0,0 +1,4 @@
|
|||
Test
|
||||
|
||||
<div>
|
||||
</div>
|
4
tests/examples/regression_tests/issue_314.hs
Normal file
4
tests/examples/regression_tests/issue_314.hs
Normal file
|
@ -0,0 +1,4 @@
|
|||
module Main where
|
||||
|
||||
main :: IO ()
|
||||
main = putStrLn "Please show my file :c"
|
3
tests/examples/regression_tests/issue_914.rb
Normal file
3
tests/examples/regression_tests/issue_914.rb
Normal file
|
@ -0,0 +1,3 @@
|
|||
<<END_DESC
|
||||
Test
|
||||
END_DESC
|
2
tests/examples/regression_tests/issue_915.vue
Normal file
2
tests/examples/regression_tests/issue_915.vue
Normal file
|
@ -0,0 +1,2 @@
|
|||
<style lang="stylus">
|
||||
</style>
|
|
@ -627,3 +627,20 @@ fn filename_multiple_err() {
|
|||
.assert()
|
||||
.failure();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn do_not_panic_regression_tests() {
|
||||
for filename in &[
|
||||
"issue_28.md",
|
||||
"issue_190.md",
|
||||
"issue_314.hs",
|
||||
"issue_914.rb",
|
||||
"issue_915.vue",
|
||||
] {
|
||||
bat()
|
||||
.arg("--color=always")
|
||||
.arg(&format!("regression_tests/{}", filename))
|
||||
.assert()
|
||||
.success();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue