| 21 | */ |
| 22 | |
| 23 | int /* O - Exit status */ |
| 24 | main(void) |
| 25 | { |
| 26 | /* |
| 27 | * Test file upload/multi-part submissions... |
| 28 | */ |
| 29 | |
| 30 | freopen("multipart.dat", "rb", stdin); |
| 31 | |
| 32 | putenv("CONTENT_TYPE=multipart/form-data; " |
| 33 | "boundary=---------------------------1977426492562745908748943111"); |
| 34 | putenv("REQUEST_METHOD=POST"); |
| 35 | |
| 36 | printf("cgiInitialize: "); |
| 37 | if (cgiInitialize()) |
| 38 | { |
| 39 | const cgi_file_t *file; /* Upload file */ |
| 40 | |
| 41 | if ((file = cgiGetFile()) != NULL) |
| 42 | { |
| 43 | puts("PASS"); |
| 44 | printf(" tempfile=\"%s\"\n", file->tempfile); |
| 45 | printf(" name=\"%s\"\n", file->name); |
| 46 | printf(" filename=\"%s\"\n", file->filename); |
| 47 | printf(" mimetype=\"%s\"\n", file->mimetype); |
| 48 | } |
| 49 | else |
| 50 | puts("FAIL (no file!)"); |
| 51 | } |
| 52 | else |
| 53 | puts("FAIL (init)"); |
| 54 | |
| 55 | /* |
| 56 | * Return with no errors... |
| 57 | */ |
| 58 | |
| 59 | return (0); |
| 60 | } |
nothing calls this directly
no test coverage detected