Skip to content

Commit

Permalink
test: io.file.simpleSize; test size on empty and small files.
Browse files Browse the repository at this point in the history
  • Loading branch information
bhelyer committed Apr 20, 2018
1 parent c3a0dd4 commit 573fdec
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
Empty file.
1 change: 1 addition & 0 deletions test/io/file/simpleSize/small.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
abc
17 changes: 17 additions & 0 deletions test/io/file/simpleSize/test.volt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//T macro:passpath
module test;

import file = watt.io.file;

fn main(args: string[]) i32
{
file.chdir(args[1]);
if (file.size("empty.txt") != 0) {
return 1;
}
if (file.size("small.txt") != 3) {
return 2;
}
return 0;
}

0 comments on commit 573fdec

Please sign in to comment.