Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions tests/error_log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,32 @@ async fn can_write_error_log() {
.assert_eq(&error_contents);
}

/// Test that `ghciwatch --errors ...` can write the error log with `--repl-no-load`.
#[test]
async fn can_write_error_log_repl_no_load() {
let error_path = "ghcid.txt";
let mut session = GhciWatchBuilder::new("tests/data/simple")
.with_args(["--errors", error_path])
.with_cabal_arg("--repl-no-load")
.start()
.await
.expect("ghciwatch starts");
let error_path = session.path(error_path);
session
.wait_until_ready()
.await
.expect("ghciwatch loads ghci");
let error_contents = session
.fs()
.read(&error_path)
.await
.expect("ghciwatch writes ghcid.txt");
expect![[r#"
All good (0 modules)
"#]]
.assert_eq(&error_contents);
}

/// Test that `ghciwatch --errors ...` can write compilation errors.
/// Then, test that it can reload when modules are changed and will correctly rewrite the error log
/// once it's fixed.
Expand Down