forked from security/hakurei
container: provide usage example
This requires cgo so unfortunately will not run in the playground. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -84,9 +84,9 @@ func TestNewAbs(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
defer func() {
|
||||
wantPanic := `path "etc" is not absolute`
|
||||
wantPanic := &AbsoluteError{Pathname: "etc"}
|
||||
|
||||
if r := recover(); r != wantPanic {
|
||||
if r := recover(); !reflect.DeepEqual(r, wantPanic) {
|
||||
t.Errorf("MustAbs: panic = %v; want %v", r, wantPanic)
|
||||
}
|
||||
}()
|
||||
|
||||
Reference in New Issue
Block a user