fix some (but far from all) visual bugs
This commit is contained in:
parent
d0bc7e952c
commit
b668a894c7
7 changed files with 114 additions and 104 deletions
|
|
@ -107,6 +107,7 @@ impl LogFileEntryGenerator {
|
|||
|
||||
struct Inner {
|
||||
pub path: PathBuf,
|
||||
#[allow(unused)]
|
||||
pub jh: Option<JoinHandle<()>>,
|
||||
first: Option<Gc<LogEntry>>,
|
||||
}
|
||||
|
|
@ -435,4 +436,42 @@ mod tests {
|
|||
assert_eq!(c.curr().message_or_name(), Some("foo".to_string()));
|
||||
assert!(!c.prev(&f));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn inline_depth() {
|
||||
let mut c = parse(
|
||||
&[
|
||||
with_fields(r#"{"message": "enter", "name": "nest1"}"#),
|
||||
with_fields(r#"{"message": "enter", "name": "nest2"}"#),
|
||||
with_fields(r#"{"message": "baz"}"#),
|
||||
with_fields(r#"{"message": "exit"}"#),
|
||||
with_fields(r#"{"message": "exit"}"#),
|
||||
]
|
||||
.join("\n"),
|
||||
);
|
||||
let mut f = filters();
|
||||
c.enter(&f);
|
||||
c.enter(&f);
|
||||
assert_eq!(c.curr().message_or_name(), Some("baz".to_string()));
|
||||
c.exit(&f);
|
||||
c.exit(&f);
|
||||
|
||||
f.push(Arc::new(Filter {
|
||||
matcher: Matcher::Field {
|
||||
name: "name".to_string(),
|
||||
value: MatcherValue::Exact("nest1".to_string()),
|
||||
},
|
||||
kind: FilterKind::Inline,
|
||||
}));
|
||||
f.push(Arc::new(Filter {
|
||||
matcher: Matcher::Field {
|
||||
name: "name".to_string(),
|
||||
value: MatcherValue::Exact("nest2".to_string()),
|
||||
},
|
||||
kind: FilterKind::Inline,
|
||||
}));
|
||||
c.update_with_parents(&f);
|
||||
|
||||
assert_eq!(c.curr().message_or_name(), Some("baz".to_string()));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue