diff options
Diffstat (limited to 'src/test.h')
-rw-r--r-- | src/test.h | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -61,4 +61,17 @@ struct VirtualFileSystem : public DiskInterface { set<string> files_removed_; }; +struct ScopedTempDir { + /// Create a temporary directory and chdir into it. + void CreateAndEnter(const string& name); + + /// Clean up the temporary directory. + void Cleanup(); + + /// The temp directory containing our dir. + string start_dir_; + /// The subdirectory name for our dir, or empty if it hasn't been set up. + string temp_dir_name_; +}; + #endif // NINJA_TEST_H_ |