Branch: Tag:

2018-02-23

2018-02-23 09:10:22 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Testsuite [WebDAV]: Added some more filesystem_*() functions.

These make it easier to use this testsuite as a base for
testsuites testing virtual wbdav filesystems.

22:      mapping(string:string) current_locks;    + int filesystem_check_exists(string path) + { +  string real_path = Stdio.append_path(real_dir, path); +  return Stdio.is_file(real_path); + }    - int filesystem_check_content(string path, string data) + string filesystem_read_file(string path)   {    string real_path = Stdio.append_path(real_dir, path); -  string real_data = Stdio.read_bytes(real_path); -  return real_data == data; +  return Stdio.read_bytes(real_path);   }    -  + int filesystem_check_content(string path, string data) + { +  return filesystem_read_file(path) == data; + }    -  + int filesystem_compare_files(string first_path, string other_path) + { +  return filesystem_check_content(other_path, filesystem_read_file(first_path)); + } +  +    array(int|mapping(string:string)|string) webdav_request(string method,    string path,    mapping(string:string)|void extra_headers,