Added unittest code to remove the testingByLine executable upon successful completion

This commit is contained in:
Andrei Alexandrescu 2011-05-01 11:42:48 -05:00
parent 9f98a3e070
commit 0c82bba5a0

View file

@ -949,6 +949,8 @@ to this file. */
//printf("Entering test at line %d\n", __LINE__);
scope(failure) printf("Failed test at line %d\n", __LINE__);
std.file.write("testingByLine", "asd\ndef\nasdf");
scope(success) std.file.remove("testingByLine");
auto witness = [ "asd", "def", "asdf" ];
uint i;
auto f = File("testingByLine");
@ -956,7 +958,6 @@ to this file. */
{
f.close;
assert(!f.isOpen);
//std.file.remove("testingByLine");
}
foreach (line; f.byLine())
{