|
| closeMvUpdate () |
|
void | execute (const std::vector< std::string > &remainingOptions) override |
|
| baseTest (const std::string &aName, const std::string &aDescription, const decltype(parameters)&aParameters, const decltype(options)&aOptions={}) |
|
void | ensuredWrite (int fd, const std::string &data) |
|
void | ensuredRead (int fd, std::string &data) |
|
void | Execute (const std::vector< std::string > &remainingOptions) |
|
Definition at line 612 of file fileOpsTests.cpp.
◆ closeMvUpdate()
closeMvUpdate::closeMvUpdate |
( |
| ) |
|
|
inline |
Definition at line 614 of file fileOpsTests.cpp.
615 "close, move, update a file", {
616 {
"file",
"path to file"
◆ execute()
void closeMvUpdate::execute |
( |
const std::vector< std::string > & |
remainingOptions | ) |
|
|
inlineoverridevirtual |
Implements baseTest.
Definition at line 619 of file fileOpsTests.cpp.
620 auto file = remainingOptions.at(0);
621 std::string movedFile(file);
622 movedFile +=
".moved";
623 auto fd =
throwcall::badval(open(file.c_str(), O_WRONLY | O_CREAT | O_TRUNC, 0744), -1,
"open ", file);
627 "rename ", file,
" to ", movedFile);
628 struct timespec times[2] = {{0, UTIME_OMIT}, {0, UTIME_NOW}};
630 "change mtime of ", file);
References throwcall::badval(), baseTest::content, baseTest::createdFiles, baseTest::ensuredWrite(), and throwcall::good0().
The documentation for this class was generated from the following file:
T badval(T call, t badvalue, const Args &... args)
template function to wrap system calls that return a special bad value on failure