mirror of
https://github.com/casey/just.git
synced 2025-12-23 11:37:29 +00:00
Refactor JSON tests (#2484)
This commit is contained in:
parent
fdc9245c5d
commit
a633b269c1
3 changed files with 644 additions and 1247 deletions
1884
tests/json.rs
1884
tests/json.rs
File diff suppressed because it is too large
Load diff
|
|
@ -10,6 +10,7 @@ pub(crate) use {
|
|||
libc::{EXIT_FAILURE, EXIT_SUCCESS},
|
||||
pretty_assertions::Comparison,
|
||||
regex::Regex,
|
||||
serde::{Deserialize, Serialize},
|
||||
serde_json::{json, Value},
|
||||
std::{
|
||||
collections::BTreeMap,
|
||||
|
|
@ -28,6 +29,10 @@ pub(crate) use {
|
|||
which::which,
|
||||
};
|
||||
|
||||
fn default<T: Default>() -> T {
|
||||
Default::default()
|
||||
}
|
||||
|
||||
#[macro_use]
|
||||
mod test;
|
||||
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ impl Test {
|
|||
}
|
||||
|
||||
pub(crate) fn stdout_regex(mut self, stdout_regex: impl AsRef<str>) -> Self {
|
||||
self.stdout_regex = Some(Regex::new(&format!("^{}$", stdout_regex.as_ref())).unwrap());
|
||||
self.stdout_regex = Some(Regex::new(&format!("(?s)^{}$", stdout_regex.as_ref())).unwrap());
|
||||
self
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue