Skip to content

Commit

Permalink
test: check happy and sad paths in file and dir tests
Browse files Browse the repository at this point in the history
  • Loading branch information
brandondyck authored and shoenig committed Aug 19, 2024
1 parent 1244f1b commit c2ea984
Show file tree
Hide file tree
Showing 6 changed files with 256 additions and 80 deletions.
9 changes: 9 additions & 0 deletions invocations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,15 @@ func (it *internalTest) assert() {
}
}

func (it *internalTest) assertNot() {
if !it.helper {
it.t.Fatal("should be marked as helper")
}
if it.trigger {
it.t.Fatalf("condition expected not to trigger; it did\ngot message %q in output", it.capture)
}
}

func (it *internalTest) post() {
if !strings.Contains(it.capture, "PostScript |") {
it.t.Fatal("expected post-script output")
Expand Down
9 changes: 9 additions & 0 deletions must/invocations_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

158 changes: 118 additions & 40 deletions must/must_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions must/testdata/dir1/file1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
real data
Loading

0 comments on commit c2ea984

Please sign in to comment.