mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
Merge branch 'repl' into repl-warnings
Signed-off-by: Richard Feldman <oss@rtfeldman.com>
This commit is contained in:
commit
0657c38bb4
5 changed files with 53 additions and 115 deletions
|
@ -88,7 +88,7 @@ fn exhaustiveness_problem() {
|
|||
#[test]
|
||||
fn tips() {
|
||||
assert!(!is_incomplete(""));
|
||||
assert_eq!(ReplState::new().step(""), Ok(TIPS.to_string()));
|
||||
assert_eq!(ReplState::new().step("", None), Ok(TIPS.to_string()));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
@ -98,7 +98,7 @@ fn standalone_annotation() {
|
|||
|
||||
incomplete(&mut input);
|
||||
assert!(!is_incomplete(&input));
|
||||
assert_eq!(state.step(&input), Ok(String::new()));
|
||||
assert_eq!(state.step(&input, None), Ok(String::new()));
|
||||
}
|
||||
|
||||
/// validate and step the given input, then check the Result vs the output
|
||||
|
@ -106,7 +106,7 @@ fn standalone_annotation() {
|
|||
fn complete(input: &str, state: &mut ReplState, expected_step_result: Result<(&str, &str), i32>) {
|
||||
assert!(!is_incomplete(input));
|
||||
|
||||
match state.step(input) {
|
||||
match state.step(input, None) {
|
||||
Ok(string) => {
|
||||
let escaped =
|
||||
std::string::String::from_utf8(strip_ansi_escapes::strip(string.trim()).unwrap())
|
||||
|
@ -144,7 +144,7 @@ fn incomplete(input: &mut String) {
|
|||
fn error(input: &str, state: &mut ReplState, expected_step_result: String) {
|
||||
assert!(!is_incomplete(input));
|
||||
|
||||
let escaped = state.step(input).map(|string| {
|
||||
let escaped = state.step(input, None).map(|string| {
|
||||
std::string::String::from_utf8(strip_ansi_escapes::strip(string.trim()).unwrap()).unwrap()
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue