From 159157060e2c42f47cfac5968245098e71817033 Mon Sep 17 00:00:00 2001 From: Samuel Moelius Date: Tue, 19 Nov 2024 16:59:43 -0500 Subject: [PATCH] Experiment --- src/main.rs | 2 ++ tests/ci.rs | 14 +++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index c80a6479..ff1db0ed 100644 --- a/src/main.rs +++ b/src/main.rs @@ -813,6 +813,7 @@ fn membership_in_clone(pkg: &Package, repo_dir: &Path) -> Result { 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; } @@ -829,6 +830,7 @@ fn membership_in_clone(pkg: &Package, repo_dir: &Path) -> Result { else { continue; }; + dbg!(&table); if table .get("package") .and_then(Value::as_table) diff --git a/tests/ci.rs b/tests/ci.rs index 76321ac0..64c95800 100644 --- a/tests/ci.rs +++ b/tests/ci.rs @@ -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}; @@ -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()); +}