Skip to content

Commit

Permalink
test(cli/stat_test): older versions of Linux don't support birthtime (
Browse files Browse the repository at this point in the history
  • Loading branch information
piscisaureus committed Aug 8, 2020
1 parent 6f6c527 commit ee1b89b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cli/tests/unit/stat_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ unitTest({ perms: { read: true } }, function fstatSyncSuccess(): void {
assert(fileInfo.size);
assert(fileInfo.atime);
assert(fileInfo.mtime);
assert(fileInfo.birthtime);
// The `birthtime` field is not available on Linux before kernel version 4.11.
assert(fileInfo.birthtime || Deno.build.os === "linux");

Deno.close(file.rid);
});
Expand All @@ -33,7 +34,8 @@ unitTest({ perms: { read: true } }, async function fstatSuccess(): Promise<
assert(fileInfo.size);
assert(fileInfo.atime);
assert(fileInfo.mtime);
assert(fileInfo.birthtime);
// The `birthtime` field is not available on Linux before kernel version 4.11.
assert(fileInfo.birthtime || Deno.build.os === "linux");

Deno.close(file.rid);
});
Expand Down

0 comments on commit ee1b89b

Please sign in to comment.