test_setopt(curl, CURLOPT_IGNORE_CONTENT_LENGTH, 1L);
test_setopt(curl, CURLOPT_FTP_FILEMETHOD, (long) CURLFTPMETHOD_SINGLECWD);
res = curl_easy_perform(curl);
+ if(res != CURLE_REMOTE_FILE_NOT_FOUND)
+ goto test_cleanup;
curl_free(newURL);
newURL = aprintf("%s/folderB/661", URL);
test_setopt(curl, CURLOPT_URL, newURL);
res = curl_easy_perform(curl);
+ if(res != CURLE_REMOTE_FILE_NOT_FOUND)
+ goto test_cleanup;
/* test: CURLFTPMETHOD_NOCWD with absolute path should
never emit CWD (for both new and reused easy handle) */
test_setopt(curl, CURLOPT_IGNORE_CONTENT_LENGTH, 1L);
test_setopt(curl, CURLOPT_FTP_FILEMETHOD, (long) CURLFTPMETHOD_NOCWD);
res = curl_easy_perform(curl);
+ if(res != CURLE_REMOTE_FILE_NOT_FOUND)
+ goto test_cleanup;
/* curve ball: CWD /folderB before reusing connection with _NOCWD */
curl_free(newURL);
test_setopt(curl, CURLOPT_URL, newURL);
test_setopt(curl, CURLOPT_FTP_FILEMETHOD, (long) CURLFTPMETHOD_SINGLECWD);
res = curl_easy_perform(curl);
+ if(res != CURLE_REMOTE_FILE_NOT_FOUND)
+ goto test_cleanup;
curl_free(newURL);
newURL = aprintf("%s/folderA/661", URL);
test_setopt(curl, CURLOPT_URL, newURL);
test_setopt(curl, CURLOPT_FTP_FILEMETHOD, (long) CURLFTPMETHOD_NOCWD);
res = curl_easy_perform(curl);
+ if(res != CURLE_REMOTE_FILE_NOT_FOUND)
+ goto test_cleanup;
/* test: CURLFTPMETHOD_NOCWD with home-relative path should
not emit CWD for first FTP access after login */
test_setopt(curl, CURLOPT_FTP_FILEMETHOD, (long) CURLFTPMETHOD_NOCWD);
test_setopt(curl, CURLOPT_QUOTE, slist);
res = curl_easy_perform(curl);
+ if(res)
+ goto test_cleanup;
/* test: CURLFTPMETHOD_SINGLECWD with home-relative path should
not emit CWD for first FTP access after login */
test_setopt(curl, CURLOPT_FTP_FILEMETHOD, (long) CURLFTPMETHOD_SINGLECWD);
test_setopt(curl, CURLOPT_QUOTE, slist);
res = curl_easy_perform(curl);
+ if(res)
+ goto test_cleanup;
/* test: CURLFTPMETHOD_NOCWD with home-relative path should
not emit CWD for second FTP access when not needed +
test_cleanup:
+ if(res)
+ fprintf(stderr, "test encountered error %d\n", res);
curl_slist_free_all(slist);
curl_free(newURL);
curl_easy_cleanup(curl);