Persist defs

This commit is contained in:
Richard Feldman 2022-10-27 15:52:27 -04:00
parent 90e79379cb
commit f841cdb2c0
No known key found for this signature in database
GPG key ID: F1F21AA5B1D9E43B
2 changed files with 117 additions and 30 deletions

View file

@ -16,8 +16,12 @@ fn standalone_annotation() {
let mut state = ReplState::new();
let mut input = "x : Str".to_string();
assert_eq!(&state.with_past_defs("test"), "test");
incomplete(&mut input);
complete(&input, &mut state, Ok(""));
assert_eq!(&state.with_past_defs("test"), "x : Str\ntest");
}
/// validate and step the given input, then check the Result vs the input