fix CI tests

This commit is contained in:
Luke Boswell 2024-01-23 14:28:40 +11:00
parent 07ad6bb1f7
commit ff6a31673a
No known key found for this signature in database
GPG key ID: F6DB3C9DB47377B0

View file

@ -323,11 +323,12 @@ mod cli_run {
}
// when you want to run `roc test` to execute `expect`s, perhaps on a library rather than an application.
fn test_roc_expect(dir_name: &str, roc_filename: &str) {
let path = file_path_from_root(dir_name, roc_filename);
let out = run_roc([CMD_TEST, path.to_str().unwrap()], &[], &[]);
assert!(out.status.success());
}
// not currently used
// fn test_roc_expect(dir_name: &str, roc_filename: &str) {
// let path = file_path_from_root(dir_name, roc_filename);
// let out = run_roc([CMD_TEST, path.to_str().unwrap()], &[], &[]);
// assert!(out.status.success());
// }
// when you don't need args, stdin or extra_env
fn test_roc_app_slim(
@ -912,9 +913,9 @@ mod cli_run {
#[cfg_attr(windows, ignore)]
fn parse_movies_csv() {
test_roc_app_slim(
"examples/parser/examples",
"examples/parser",
"parse-movies-csv.roc",
"Parse success!\n",
"2 movies were found:\n\nThe movie 'Airplane!' was released in 1980 and stars Robert Hays and Julie Hagerty\nThe movie 'Caddyshack' was released in 1980 and stars Chevy Chase, Rodney Dangerfield, Ted Knight, Michael O'Keefe and Bill Murray\n\nParse success!\n\n",
UseValgrind::No,
)
}
@ -924,19 +925,13 @@ mod cli_run {
#[cfg_attr(windows, ignore)]
fn parse_letter_counts() {
test_roc_app_slim(
"examples/parser/examples",
"examples/parser",
"letter-counts.roc",
"I counted 7 letter A's!\n",
UseValgrind::No,
)
}
#[test]
#[cfg_attr(windows, ignore)]
fn parse_http() {
test_roc_expect("examples/parser/package", "ParserHttp.roc")
}
#[test]
#[cfg_attr(windows, ignore)]
fn inspect_logging() {