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:2438:    if (caseSensitive) {    cases = ({ "mc" });    }    foreach (FILENAMES, string filename) {    foreach (({"NFC", "NFD"}), string unicode_method) {    mapping(string:string) resources = make_filenames(this::testcase_dir,    filename,    unicode_method,    true);    string resource = resources->mc; -  string exp_name = make_filenames(this::testcase_dir, +  string ls_name = make_filenames(this::testcase_dir,    filename,    "NFC",    false)->mc;    foreach (({"NFC", "NFD"}), string unicode_method) {    mapping(string:string) resources = make_filenames(this::testcase_dir,    filename,    unicode_method,    true);    foreach (cases, string case_) {    // Lock the resource (does not exist yet).
Roxen.git/server/etc/test/modules/TEST.pmod/http.pmod/WebDAV.pmod/TestBase.pike:2462:    // Verify that we cannot create collection or file without the lock.    // Try do delete without lock.    webdav_mkcol(resources[case_], STATUS_LOCKED);    webdav_put(resources[case_], "My content", STATUS_LOCKED);    webdav_ls(resources[case_], ({ }), STATUS_NOT_FOUND);    webdav_delete(resources[case_], ([]), STATUS_NOT_FOUND);       // Now lets create a the resources (a file) that we have locked.    webdav_put(resource, "My content", STATUS_CREATED,    make_lock_header(locks)); -  webdav_ls(resources[case_], ({ exp_name })); +  webdav_ls(resources[case_], ({ ls_name }));    -  // Try tp write to the locked file. Try to delete the locked file. +  // Try to write to the locked file. Try to delete the locked file.    webdav_put(resources[case_], "New content", STATUS_LOCKED);    webdav_delete(resources[case_], ([]), STATUS_LOCKED);       string lock_token = locks[resource];    mapping(string:string) lock_header =    make_lock_header(([ resources[case_] : lock_token ]));    // Put using lock.    webdav_put(resources[case_], "New content", STATUS_OK, lock_header); -  +  // The put above should not have changed the filename +  webdav_ls(this::testcase_dir, ({ this::testcase_dir, ls_name })); +     // Delete without the lock. -  webdav_delete(resource, ([]), STATUS_LOCKED); +  webdav_delete(resources[case_], ([]), STATUS_LOCKED);    // Delete using lock. -  webdav_delete(resource, ([]), STATUS_NO_CONTENT, lock_header); +  webdav_delete(resources[case_], ([]), STATUS_NO_CONTENT, lock_header);       // Assert testcase dir is empty before next run.    webdav_ls(this::testcase_dir, ({ this::testcase_dir }));    }    }    }    }   }