mirror of
https://github.com/watchexec/watchexec.git
synced 2024-09-28 22:21:33 +02:00
Express process end exceptions as hex in filters
This commit is contained in:
parent
9d04143202
commit
f19dbf945d
@ -390,7 +390,7 @@ impl TaggedFilterer {
|
||||
|| filter.matches(format!("signal({})", int))?)
|
||||
}
|
||||
Some(ProcessEnd::ExitStop(int)) => filter.matches(format!("stop({})", int)),
|
||||
Some(ProcessEnd::Exception(int)) => filter.matches(format!("exception({})", int)),
|
||||
Some(ProcessEnd::Exception(int)) => filter.matches(format!("exception({:X})", int)),
|
||||
Some(ProcessEnd::Continued) => filter.matches("continued"),
|
||||
},
|
||||
(_, _) => {
|
||||
|
@ -362,9 +362,9 @@ async fn complete_with_any_stop() {
|
||||
|
||||
#[tokio::test]
|
||||
async fn complete_with_specific_exception() {
|
||||
let filterer = filt(&[filter("complete*=exception(19)")]).await;
|
||||
let filterer = filt(&[filter("complete*=exception(4B53)")]).await;
|
||||
|
||||
filterer.complete_does_pass(Some(ProcessEnd::Exception(NonZeroI32::new(19).unwrap())));
|
||||
filterer.complete_does_pass(Some(ProcessEnd::Exception(NonZeroI32::new(19283).unwrap())));
|
||||
filterer.complete_doesnt_pass(Some(ProcessEnd::Success));
|
||||
filterer.complete_doesnt_pass(None);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user