mirror of
https://github.com/roc-lang/roc.git
synced 2024-09-21 15:59:20 +03:00
test expects for variables and expressions
This commit is contained in:
parent
4b9e64fd7d
commit
9c72eb5b93
@ -310,6 +310,9 @@ mod cli_run {
|
||||
actual = format!("{}passed in <ignored for test> ms.", before_first_digit);
|
||||
}
|
||||
|
||||
let self_path = file.display().to_string();
|
||||
actual = actual.replace(&self_path, "<ignored for tests>");
|
||||
|
||||
if !actual.ends_with(expected_ending) {
|
||||
panic!(
|
||||
"expected output to end with:\n{}\nbut instead got:\n{}\n stderr was:\n{}",
|
||||
@ -573,6 +576,9 @@ mod cli_run {
|
||||
x : Num *
|
||||
x = 42
|
||||
|
||||
[<ignored for tests> 15:9] 42
|
||||
[<ignored for tests> 16:9] "Fjoer en ferdjer frieten oan dyn geve lea"
|
||||
Program finished!
|
||||
"#
|
||||
),
|
||||
UseValgrind::Yes,
|
||||
|
@ -12,4 +12,6 @@ expect
|
||||
main =
|
||||
x = 42
|
||||
expect x != x
|
||||
"Program finished!"
|
||||
dbg x
|
||||
dbg "Fjoer en ferdjer frieten oan dyn geve lea"
|
||||
"Program finished!\n"
|
||||
|
Loading…
Reference in New Issue
Block a user