mirror of
https://github.com/dlang/phobos.git
synced 2025-05-01 15:40:36 +03:00
Added unittest code to remove the testingByLine executable upon successful completion
This commit is contained in:
parent
9f98a3e070
commit
0c82bba5a0
1 changed files with 9 additions and 8 deletions
|
@ -949,6 +949,8 @@ to this file. */
|
||||||
//printf("Entering test at line %d\n", __LINE__);
|
//printf("Entering test at line %d\n", __LINE__);
|
||||||
scope(failure) printf("Failed test at line %d\n", __LINE__);
|
scope(failure) printf("Failed test at line %d\n", __LINE__);
|
||||||
std.file.write("testingByLine", "asd\ndef\nasdf");
|
std.file.write("testingByLine", "asd\ndef\nasdf");
|
||||||
|
scope(success) std.file.remove("testingByLine");
|
||||||
|
|
||||||
auto witness = [ "asd", "def", "asdf" ];
|
auto witness = [ "asd", "def", "asdf" ];
|
||||||
uint i;
|
uint i;
|
||||||
auto f = File("testingByLine");
|
auto f = File("testingByLine");
|
||||||
|
@ -956,7 +958,6 @@ to this file. */
|
||||||
{
|
{
|
||||||
f.close;
|
f.close;
|
||||||
assert(!f.isOpen);
|
assert(!f.isOpen);
|
||||||
//std.file.remove("testingByLine");
|
|
||||||
}
|
}
|
||||||
foreach (line; f.byLine())
|
foreach (line; f.byLine())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue