b9659b2018-02-21Karl Gustav Sterneberg inherit "etc/test/tests/http/WebdavTestBase.pike";
4044dc2018-02-16Henrik Grubbström (Grubba)  string filesystem_dir = "$VARDIR/testsuite/webdav/testdir"; // Expanded filesystem_dir. string real_dir;
70ce1c2018-02-16Henrik Grubbström (Grubba) int filesystem_check_exists(string path) { string real_path = Stdio.append_path(real_dir, path); return Stdio.is_file(real_path); }
4044dc2018-02-16Henrik Grubbström (Grubba) 
70ce1c2018-02-16Henrik Grubbström (Grubba) string filesystem_read_file(string path)
4044dc2018-02-16Henrik Grubbström (Grubba) { string real_path = Stdio.append_path(real_dir, path);
70ce1c2018-02-16Henrik Grubbström (Grubba)  return Stdio.read_bytes(real_path); }
4044dc2018-02-16Henrik Grubbström (Grubba) void setup() { real_dir = roxen_path(filesystem_dir); report_debug("Webdav real_dir: %O\n", real_dir); Stdio.mkdirhier(real_dir); }