Skip to content

Commit

Permalink
Experiment
Browse files Browse the repository at this point in the history
  • Loading branch information
smoelius committed Nov 19, 2024
1 parent 0c3da42 commit 1591570
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -813,6 +813,7 @@ fn membership_in_clone(pkg: &Package, repo_dir: &Path) -> Result<bool> {
for entry in WalkDir::new(repo_dir) {
let entry = entry?;
let path = entry.path();
dbg!(path);
if path.file_name() != Some(OsStr::new("Cargo.toml")) {
continue;
}
Expand All @@ -829,6 +830,7 @@ fn membership_in_clone(pkg: &Package, repo_dir: &Path) -> Result<bool> {
else {
continue;
};
dbg!(&table);
if table
.get("package")
.and_then(Value::as_table)
Expand Down
14 changes: 13 additions & 1 deletion tests/ci.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use assert_cmd::Command;
use assert_cmd::{output::OutputError, Command};
use regex::Regex;
use similar_asserts::SimpleDiff;
use std::{env::remove_var, fs::read_to_string, path::Path};
Expand Down Expand Up @@ -227,3 +227,15 @@ fn sort() {
.success();
}
}

#[test]
fn pretty_yaml() {
let output = Command::cargo_bin("cargo-unmaintained")
.unwrap()
.args(["unmaintained", "-p", "pretty_yaml"])
.output()
.unwrap();
let output = OutputError::new(output);
println!("{}", output);
assert!(output.as_output().unwrap().status.success());
}

0 comments on commit 1591570

Please sign in to comment.