Skip to content

Commit 455eef3

Browse files
committed
test: add sealed test to preserve developer environement
1 parent e5b8ceb commit 455eef3

File tree

34 files changed

+812
-936
lines changed

34 files changed

+812
-936
lines changed

Cargo.lock

Lines changed: 378 additions & 55 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,8 @@ path = "src/bin/bombadil.rs"
4040
required-features = ["clap"]
4141

4242
[dev-dependencies]
43-
temp_testdir = "0.2"
43+
sealed_test = "1.0.0"
44+
speculoos = "0.8.0"
45+
cmd_lib = "1.3.0"
46+
pretty_assertions = "1.2.1"
47+
indoc = "1.0.4"

src/bin/bombadil.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ use anyhow::Result;
22
use clap::lazy_static::lazy_static;
33
use clap::{AppSettings, IntoApp, Parser};
44
use clap_complete::Shell;
5+
use std::io;
56
use std::io::BufRead;
67
use std::path::{Path, PathBuf};
78
use std::str::FromStr;
@@ -209,7 +210,9 @@ async fn main() -> Result<()> {
209210
.enable_profiles(profiles.iter().map(String::as_str).collect())
210211
.unwrap_or_else(|err| fatal!("{}", err));
211212

212-
bombadil.print_metadata(metadata_type);
213+
bombadil
214+
.print_metadata(metadata_type, &mut io::stdout())
215+
.expect("Failed to write metadata to stdout");
213216
}
214217
Cli::GenerateCompletions { shell } => {
215218
clap_complete::generate(

0 commit comments

Comments
 (0)