mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 11:52:19 +00:00
test expects for variables and expressions
This commit is contained in:
parent
4b9e64fd7d
commit
9c72eb5b93
2 changed files with 9 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue