Roxen.git / server / etc / test / modules / TEST.pmod / http.pmod / WebDAV.pmod / TestBase.pike

version» Context lines:

Roxen.git/server/etc/test/modules/TEST.pmod/http.pmod/WebDAV.pmod/TestBase.pike:196:    Standards.URI url = Standards.URI(path, base_uri);    con = Protocols.HTTP.do_method(method, url, UNDEFINED, headers, con, data);       DAV_WERROR("Webdav: %s %O (url: %O) ==> code: %d\n",    method, path, url, con?con->status:600);       if (!con) {    return WebDAVResponse(600, ([]), "" );    }    +  ASSERT_TRUE((headers->connection == "close") || +  (con->headers->connection != "close")); +     return WebDAVResponse(con->status, con->headers, con->data());   }      private mapping(string:string) make_lock_header(mapping(string:string) locks)   {    string if_header = "";    foreach(locks; string path; string lock_token) {    if (has_prefix(path, "/")) {    path = path[1..];    }
Roxen.git/server/etc/test/modules/TEST.pmod/http.pmod/WebDAV.pmod/TestBase.pike:2109:      // -----------------------------------------------------------------------------   // Special testcases combining different encodings and mixed/lower/upper case   // letters.   // -----------------------------------------------------------------------------      // NB: Some character sets (eg kanji, hangul, etc) only have   // a single "case", and make_filenames() requires multiple   // cases. Work around this issue by prefixing with some   // multi-case ascii characters. - #ifdef WEBDAV_TEST_ASCII_ONLY +    protected constant FILENAMES =    ({ -  "Ascii-myFile", // To compare with -  }); - #else - protected constant FILENAMES = -  ({ +     "Ascii-myFile", // To compare with -  + #ifndef WEBDAV_TEST_ASCII_ONLY    "Latin1-åÅäÄöÖæÆüÜñÑ@", // Some Latin 1 chars    "Latin2-ąĄŁůŮăĂçÇ", // Some Latin 2 chars    "Cyrillic-фщъЂЃЄЉЖ", // Some Cyrillic chars    "Greek-ώψφλξβΩΠΞΔ€", // Some Greek chars    "Kanji-日本語ひらがなカタカナ", // Some Kanji, hiragana and katakana. -  }); + #ifdef __NT__ +  "Specials-)(~^[", // Various special characters (NT valid). + #else +  "Specials-:;)(<*~^[", // Various special characters (POSIX).   #endif -  + #endif +  });      // Create directory and file using one encoding and mixed, lower or upper case.   // Then do ls for all combinations of (same encoding, other encoding) x   // (mixed case, lower case, upper case).   public void test_x_ls()   {    int count = 0;    bool normalizing = !non_normalizing_filesystem();    bool casesensitive = case_sensitive_filesystem();    int w = sizeof("" + (sizeof(FILENAMES)*2*3) );
Roxen.git/server/etc/test/modules/TEST.pmod/http.pmod/WebDAV.pmod/TestBase.pike:2252:    // If you want to try single chars, just ad them as new strings to the array    // below.    array(string) FILENAMES = ({   #ifdef __NT__    /* NB: *, ? and | are apparently invalid characters in NTFS. */    /* NB: Space at the end of path segments is *sometimes* stripped on NTFS. */    " _ [](){}+-#%&=$~",   #else /* !__NT__ */    " _ [](){}+-*#%&=?|$~ ",   #endif /* __NT__ */ +  /* NB: Test mismatching parenthesis. */ +  "])}", +  "[({",    });    foreach (FILENAMES, string file) {    mixed e = catch {    // This test should only include chars that are the same before and after    // encoding    ASSERT_EQUAL(file, Unicode.normalize(file, "NFC"));    ASSERT_EQUAL(file, Unicode.normalize(file, "NFD"));    // Test starts here...    string dir_path = Stdio.append_path("/", testdir, file);    string file_path = dir_path + "/" + file + ".txt";