mirror of
https://github.com/watchexec/watchexec.git
synced 2024-09-28 22:21:33 +02:00
parent
93da1ce780
commit
4af6865ef0
@ -347,6 +347,37 @@ async fn multipath_allow_on_any_one_pass() {
|
|||||||
assert!(filterer.check_event(&event).unwrap());
|
assert!(filterer.check_event(&event).unwrap());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[tokio::test]
|
||||||
|
async fn extensions_and_filters_glob() {
|
||||||
|
let filterer = filt(&["*/justfile"], &[], &["md", "css"]).await;
|
||||||
|
|
||||||
|
filterer.file_does_pass("justfile");
|
||||||
|
filterer.file_does_pass("foo/justfile");
|
||||||
|
filterer.file_does_pass("bar.md");
|
||||||
|
filterer.file_does_pass("qux.css");
|
||||||
|
filterer.file_doesnt_pass("nope.py");
|
||||||
|
}
|
||||||
|
|
||||||
|
#[tokio::test]
|
||||||
|
async fn extensions_and_filters_slash() {
|
||||||
|
let filterer = filt(&["/justfile"], &[], &["md", "css"]).await;
|
||||||
|
|
||||||
|
filterer.file_does_pass("justfile");
|
||||||
|
filterer.file_does_pass("bar.md");
|
||||||
|
filterer.file_does_pass("qux.css");
|
||||||
|
filterer.file_doesnt_pass("nope.py");
|
||||||
|
}
|
||||||
|
|
||||||
|
#[tokio::test]
|
||||||
|
async fn leading_single_glob_file() {
|
||||||
|
let filterer = filt(&["*/justfile"], &[], &[]).await;
|
||||||
|
|
||||||
|
filterer.file_does_pass("justfile");
|
||||||
|
filterer.file_does_pass("foo/justfile");
|
||||||
|
filterer.file_doesnt_pass("notfile");
|
||||||
|
filterer.file_doesnt_pass("not/thisfile");
|
||||||
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn nonpath_event_passes() {
|
async fn nonpath_event_passes() {
|
||||||
use watchexec::{
|
use watchexec::{
|
||||||
|
Loading…
Reference in New Issue
Block a user