| 1 | package outputscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/ |
| 2 | |
| 3 | import ( |
| 4 | "reflectscip-go gomod github.com/golang/go/src go1.18 reflect/" |
| 5 | "testingscip-go gomod github.com/golang/go/src go1.18 testing/" |
| 6 | "timescip-go gomod github.com/golang/go/src go1.18 time/" |
| 7 | |
| 8 | "github.com/ffuf/ffuf/v2/pkg/ffufscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/" |
| 9 | ) |
| 10 | |
| 11 | func TestToCSVscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/TestToCSV().(t *testingscip-go gomod github.com/golang/go/src go1.18 testing/.Tscip-go gomod github.com/golang/go/src go1.18 testing/T#) { |
| 12 | result := ffufscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/.Resultscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#{ |
| 13 | Inputscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#Input.: map[string][]byte{"x": {66}, "FFUFHASH": {65}}, |
| 14 | Positionscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#Position.: 1, |
| 15 | StatusCodescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#StatusCode.: 200, |
| 16 | ContentLengthscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#ContentLength.: 3, |
| 17 | ContentWordsscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#ContentWords.: 4, |
| 18 | ContentLinesscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#ContentLines.: 5, |
| 19 | ContentTypescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#ContentType.: "application/json", |
| 20 | RedirectLocationscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#RedirectLocation.: "http://no.pe", |
| 21 | Urlscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#Url.: "http://as.df", |
| 22 | Durationscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#Duration.: timescip-go gomod github.com/golang/go/src go1.18 time/.Durationscip-go gomod github.com/golang/go/src go1.18 time/Duration#(123), |
| 23 | ResultFilescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#ResultFile.: "resultfile", |
| 24 | Hostscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/ffuf`/Result#Host.: "host", |
| 25 | } |
| 26 | |
| 27 | csv := toCSVscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/output`/toCSV().(result) |
| 28 | |
| 29 | if !reflectscip-go gomod github.com/golang/go/src go1.18 reflect/.DeepEqualscip-go gomod github.com/golang/go/src go1.18 reflect/DeepEqual().(csv, []string{ |
| 30 | "B", |
| 31 | "http://as.df", |
| 32 | "http://no.pe", |
| 33 | "1", |
| 34 | "200", |
| 35 | "3", |
| 36 | "4", |
| 37 | "5", |
| 38 | "application/json", |
| 39 | "123ns", |
| 40 | "resultfile", |
| 41 | "A"}) { |
| 42 | t.Errorfscip-go gomod github.com/golang/go/src go1.18 testing/common#Errorf().("CSV was not generated in expected format") |
| 43 | } |
| 44 | } |