Skip to content

Commit

Permalink
[cookbook] remove temporary files created from scripts
Browse files Browse the repository at this point in the history
Some scripts generate temporary files that shouldn't be cleaned up in the
script themselves (it wouldn't make sense in the context of the example).
Nevertheless, this leaves temporary files lying around on the filesystem
after running the test suite, thus the tests now clean these files up.
  • Loading branch information
Paul Cochrane committed Jun 3, 2015
1 parent ef0f149 commit 0c93c1a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions t/categories/cookbook/07file-access.t
Expand Up @@ -14,6 +14,7 @@ subtest {

my $output = run-example($example-name);
is($output, $expected-output, $example-name);
unlink "test_file"; # the script generates this file
}, "07-01opening_file.pl";

#| run the given example script
Expand Down
1 change: 1 addition & 0 deletions t/categories/cookbook/14database-access.t
Expand Up @@ -14,6 +14,7 @@ subtest {

my $output = run-example($example-name);
is($output, $expected-output, $example-name);
unlink "video.db"; # the script creates this file
}, "14-09-dbi-sql.pl";

#| run the given example script
Expand Down

0 comments on commit 0c93c1a

Please sign in to comment.