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:2108:    Test both with an empty destination directory and with a non empty    destination directory. (We already test at least one of the cases.)   */         // -----------------------------------------------------------------------------   // 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    "Latin1-åÅäÄöÖæÆüÜñÑ@", // Some Latin 1 chars    "Latin2-ąĄŁůŮăĂçÇ", // Some Latin 2 chars    "Cyrillic-фщъЂЃЄЉЖ", // Some Cyrillic chars    "Greek-ώψφλξβΩΠΞΔ€", // Some Greek chars -  +  "Kanji-日本語ひらがなカタカナ", // Some Kanji, hiragana and katakana. +  "Specials-:;)(<*~^[", // Various special characters.    });   #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();
Roxen.git/server/etc/test/modules/TEST.pmod/http.pmod/WebDAV.pmod/TestBase.pike:2250:    // 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";