Skip to content

Commit

Permalink
Condense snapshot tests (#647)
Browse files Browse the repository at this point in the history
  • Loading branch information
nwagner84 authored Jul 9, 2023
1 parent 556776e commit 9a3453f
Showing 1 changed file with 16 additions and 76 deletions.
92 changes: 16 additions & 76 deletions pica-toolkit/tests/snapshot.rs
Original file line number Diff line number Diff line change
@@ -1,90 +1,30 @@
#[test]
fn cat() {
fn cli_tests() {
trycmd::TestCases::new()
.case("tests/snapshot/cat/*.toml")
.case("tests/snapshot/cat/*.trycmd");
}

#[test]
fn completions() {
trycmd::TestCases::new()
.case("tests/snapshot/cat/*.trycmd")
.case("tests/snapshot/completions/*.toml")
.case("tests/snapshot/completions/*.trycmd");
}

#[test]
fn count() {
trycmd::TestCases::new()
.case("tests/snapshot/completions/*.trycmd")
.case("tests/snapshot/count/*.toml")
.case("tests/snapshot/count/*.trycmd");
}

#[test]
fn filter() {
trycmd::TestCases::new()
.case("tests/snapshot/count/*.trycmd")
.case("tests/snapshot/filter/*.toml")
.case("tests/snapshot/filter/*.trycmd");
}

#[test]
fn frequency() {
trycmd::TestCases::new()
.case("tests/snapshot/filter/*.trycmd")
.case("tests/snapshot/frequency/*.toml")
.case("tests/snapshot/frequency/*.trycmd");
}

#[test]
fn invalid() {
trycmd::TestCases::new()
.case("tests/snapshot/frequency/*.trycmd")
.case("tests/snapshot/hash/*.toml")
.case("tests/snapshot/hash/*.trycmd")
.case("tests/snapshot/invalid/*.toml")
.case("tests/snapshot/invalid/*.trycmd");
}

#[test]
fn partition() {
trycmd::TestCases::new()
.case("tests/snapshot/invalid/*.trycmd")
.case("tests/snapshot/partition/*.toml")
.case("tests/snapshot/partition/*.trycmd");
}

#[test]
fn select() {
trycmd::TestCases::new()
.case("tests/snapshot/partition/*.trycmd")
.case("tests/snapshot/print/*.toml")
.case("tests/snapshot/print/*.trycmd")
.case("tests/snapshot/sample/*.toml")
.case("tests/snapshot/sample/*.trycmd")
.case("tests/snapshot/select/*.toml")
.case("tests/snapshot/select/*.trycmd");
}

#[test]
fn slice() {
trycmd::TestCases::new()
.case("tests/snapshot/select/*.trycmd")
.case("tests/snapshot/slice/*.toml")
.case("tests/snapshot/slice/*.trycmd");
}

#[test]
fn split() {
trycmd::TestCases::new()
.case("tests/snapshot/slice/*.trycmd")
.case("tests/snapshot/split/*.toml")
.case("tests/snapshot/split/*.trycmd");
}

#[test]
fn hash() {
trycmd::TestCases::new()
.case("tests/snapshot/hash/*.toml")
.case("tests/snapshot/hash/*.trycmd");
}

#[test]
fn print() {
trycmd::TestCases::new()
.case("tests/snapshot/print/*.toml")
.case("tests/snapshot/print/*.trycmd");
}

#[test]
fn sample() {
trycmd::TestCases::new()
.case("tests/snapshot/sample/*.toml")
.case("tests/snapshot/sample/*.trycmd");
}

0 comments on commit 9a3453f

Please sign in to comment.