diff --git a/tests/journey/ein.sh b/tests/journey/ein.sh index a0d2f7d8e4..88daa9d085 100644 --- a/tests/journey/ein.sh +++ b/tests/journey/ein.sh @@ -55,6 +55,24 @@ title "Porcelain ${kind}" expect_run_sh $SUCCESSFULLY "$exe t estimate-hours --omit-unify-identities 2>/dev/null" } ) + (with "the --file-stats argument" + it "succeeds and shows file statistics" && { + WITH_SNAPSHOT="$snapshot/file-stats-success" \ + expect_run_sh $SUCCESSFULLY "$exe tool estimate-hours --file-stats 2>/dev/null" + } + ) + (with "the --line-stats argument" + it "succeeds and shows line statistics" && { + WITH_SNAPSHOT="$snapshot/line-stats-success" \ + expect_run_sh $SUCCESSFULLY "$exe tool estimate-hours --line-stats 2>/dev/null" + } + ) + (with "all --stats arguments and pii" + it "succeeds and shows all statistics" && { + WITH_SNAPSHOT="$snapshot/all-stats-success" \ + expect_run_sh $SUCCESSFULLY "$exe tool estimate-hours -pfl 2>/dev/null" + } + ) (with "a branch name that doesn't exist" it "fails and shows a decent enough error message" && { WITH_SNAPSHOT="$snapshot/invalid-branch-name-failure" \ diff --git a/tests/snapshots/porcelain/estimate-hours/all-stats-success b/tests/snapshots/porcelain/estimate-hours/all-stats-success new file mode 100644 index 0000000000..1c30a86865 --- /dev/null +++ b/tests/snapshots/porcelain/estimate-hours/all-stats-success @@ -0,0 +1,13 @@ +Sebastian Thiel +3 commits found +total time spent: 2.00h (0.25 8h days, 100.00%) +total files added/removed/modified: 1/0/1 (100.00%) +total lines added/removed: 1/0 (100.00%) + +total hours: 2.00 +total 8h days: 0.25 +total commits = 3 +total authors: 1 +total files added/removed/modified: 1/0/1 +total lines added/removed: 1/0 +total unique authors: 1 (0.00% duplication) \ No newline at end of file diff --git a/tests/snapshots/porcelain/estimate-hours/file-stats-success b/tests/snapshots/porcelain/estimate-hours/file-stats-success new file mode 100644 index 0000000000..cfdb9d1ffe --- /dev/null +++ b/tests/snapshots/porcelain/estimate-hours/file-stats-success @@ -0,0 +1,6 @@ +total hours: 2.00 +total 8h days: 0.25 +total commits = 3 +total authors: 1 +total files added/removed/modified: 1/0/1 +total unique authors: 1 (0.00% duplication) \ No newline at end of file diff --git a/tests/snapshots/porcelain/estimate-hours/line-stats-success b/tests/snapshots/porcelain/estimate-hours/line-stats-success new file mode 100644 index 0000000000..0d1db43a6f --- /dev/null +++ b/tests/snapshots/porcelain/estimate-hours/line-stats-success @@ -0,0 +1,6 @@ +total hours: 2.00 +total 8h days: 0.25 +total commits = 3 +total authors: 1 +total lines added/removed: 1/0 +total unique authors: 1 (0.00% duplication) \ No newline at end of file