Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
Signed-off-by: Billy Zha <[email protected]>
  • Loading branch information
qweeah committed Dec 23, 2022
1 parent a7bbac7 commit a32eb08
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cmd/oras/internal/fileref/unix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,10 @@ func TestParse(t *testing.T) {
wantMediatype string
wantErr bool
}{
{"empty file name", args{":", ""}, "", "", true},
{"empty file name, with media type", args{":a", "b"}, "", "", true},

{"empty file name", args{"", ""}, "", "", true},
{"empty file name and media type", args{":", ""}, "", "", true},
{"empty file name with media type", args{":a", "b"}, "", "", true},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down

0 comments on commit a32eb08

Please sign in to comment.