Sandbox.shouldExist

Assert that a file exists in the sandbox

struct Sandbox
void
shouldExist
const
(
string fileName
,
in string file = __FILE__
,
in size_t line = __LINE__
)

Examples

1 with(immutable Sandbox()) {
2     import unit_threaded.should;
3 
4     shouldExist("bar.txt").shouldThrow;
5     writeFile("bar.txt");
6     shouldExist("bar.txt");
7 }

Meta