mirror of
https://git.aramjonghu.dev/AramJonghu/rustlings.git
synced 2026-09-03 00:43:29 +02:00
Fix tests
This commit is contained in:
@@ -17,7 +17,7 @@ struct InfoToml {
|
||||
|
||||
#[test]
|
||||
fn dev_cargo_bins() {
|
||||
let content = fs::read_to_string("exercises/Cargo.toml").unwrap();
|
||||
let content = fs::read_to_string("dev/Cargo.toml").unwrap();
|
||||
|
||||
let exercises = toml_edit::de::from_str::<InfoToml>(&fs::read_to_string("info.toml").unwrap())
|
||||
.unwrap()
|
||||
|
||||
@@ -194,24 +194,13 @@ fn run_test_exercise_does_not_prompt() {
|
||||
|
||||
#[test]
|
||||
fn run_single_test_success_with_output() {
|
||||
Command::cargo_bin("rustlings")
|
||||
.unwrap()
|
||||
.args(["--nocapture", "run", "testSuccess"])
|
||||
.current_dir("tests/fixture/success/")
|
||||
.assert()
|
||||
.code(0)
|
||||
.stdout(predicates::str::contains("THIS TEST TOO SHALL PASS"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn run_single_test_success_without_output() {
|
||||
Command::cargo_bin("rustlings")
|
||||
.unwrap()
|
||||
.args(["run", "testSuccess"])
|
||||
.current_dir("tests/fixture/success/")
|
||||
.assert()
|
||||
.code(0)
|
||||
.stdout(predicates::str::contains("THIS TEST TOO SHALL PASS").not());
|
||||
.stdout(predicates::str::contains("THIS TEST TOO SHALL PASS"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user