chore(release): prepare public source release

This commit is contained in:
MercuryToolbox Release
2026-07-18 15:33:01 +08:00
commit 34d6a57f38
510 changed files with 163501 additions and 0 deletions
+45
View File
@@ -0,0 +1,45 @@
//! Integration tests for the `csvshape` command.
use std::fs;
use assert_cmd::Command;
use predicates::prelude::*;
use tempfile::tempdir;
fn cargo_command() -> Command {
Command::cargo_bin("csvshape").expect("binary")
}
#[test]
fn summarizes_csv_as_json() {
let temp = tempdir().expect("tempdir");
let path = temp.path().join("sample.csv");
fs::write(
&path,
"name,age,city\nAda,34,London\nBob,,Paris\nCara,29,Paris\n",
)
.expect("fixture");
cargo_command()
.arg("--json")
.arg(&path)
.assert()
.success()
.stdout(predicate::str::contains("\"row_count\":3"))
.stdout(predicate::str::contains("\"column_count\":3"))
.stdout(predicate::str::contains("\"name\":\"age\""));
}
#[test]
fn help_includes_csv_examples() {
cargo_command()
.arg("--help")
.assert()
.success()
.stdout(predicate::str::contains(
"csvshape [OPTIONS] diff <BEFORE> <AFTER>",
))
.stdout(predicate::str::contains("--sample-rows"))
.stdout(predicate::str::contains("ConvertFrom-Json"))
.stdout(predicate::str::contains("csvshape"));
}