Skip to content
Browse files

Added tests for File::Copy and File::Mkdir

  • Loading branch information...
1 parent bcb9f68 commit abb259c0bff967acd5f1208cb509cd98ab9444c9 @tadzik committed Sep 24, 2010
Showing with 26 additions and 0 deletions.
  1. +10 −0 t/02-file-copy.t
  2. +13 −0 t/03-file-mkdir.t
  3. +3 −0 t/test.file
View
10 t/02-file-copy.t
@@ -0,0 +1,10 @@
+use v6;
+use Test;
+use File::Copy;
+
+cp 't/test.file', 't/another.file';
+is slurp('t/test.file'),
+ slurp('t/another.file'),
+ "copied file is identical";
+unlink 't/another.file';
+done_testing;
View
13 t/03-file-mkdir.t
@@ -0,0 +1,13 @@
+use v6;
+use Test;
+use File::Mkdir;
+
+mkdir 't/dupa';
+ok ('t/dupa'.IO ~~ :d), 'casual mkdir still works';
+mkdir 't/dupa/foo/bar', :p;
+ok ('t/dupa/foo'.IO ~~ :d), 'mkdir :p, 1/2';
+ok ('t/dupa/foo/bar'.IO ~~ :d), 'mkdir :p, 1/2';
+unlink 't/dupa/foo/bar';
+unlink 't/dupa/foo';
+unlink 't/dupa/';
+done_testing;
View
3 t/test.file
@@ -0,0 +1,3 @@
+foo foo
+asd
+foo bar

0 comments on commit abb259c

Please sign in to comment.
Something went wrong with that request. Please try again.