Test::BDD::Infrastructure::File - cucumber step definitions for checking files
version 1.005
Scenario: Check /etc/hosts file Given the file /etc/hosts exists Then the file must be non-zero size And the file type must be plain file And the file mode must be 0644 And the file must be owned by user root And the file must be owned by group root And the file size must be at least 200 byte And the file mtime must be newer than 20 years And the file mtime must be older than 30 seconds And the file must contain at least 10 lines Scenario: test /etc directory Given the directory /etc exists Then the file type must be directory And the directory must contain at least 100 files
The path of the directory or file must be specified with:
Given the file <path> exists
or
Given the directory <path> exists
Then the file must be empty Then the file must be non-zero size Then the file must be non-zero size Then the file type must be plain file Then the file type must be directory Then the file type must be symbolic link Then the file type must be socket Then the file type must be pipe Then the file type must be block device Then the file type must be character device
Then the file mode must be <octal mode> Then the file must be owned by user <uid|username> Then the file must be owned by group <gid|groupname> Then the file size must be <compare operator> <count> <byte unit> Then the file atime must be <compare operator> <count> <interval> Then the file ctime must be <compare operator> <count> <interval> Then the file mtime must be <compare operator> <count> <interval>
Then the file must be owned by user root Then the file mtime must be newer than 20 years Then the file size must be at least 200 bytes
Then the file must contain <compare> <count> lines Then the files content must match <regex> Then the files content must not match <regex>
Then the directory must contain <compare> <count> files Then the directory must contain a file like <regex> Then the directory must contain no file like <regex>
Markus Benning <ich@markusbenning.de>
This software is copyright (c) 2015 by Markus Benning.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Test::BDD::Infrastructure, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::BDD::Infrastructure
CPAN shell
perl -MCPAN -e shell install Test::BDD::Infrastructure
For more information on module installation, please visit the detailed CPAN module installation guide.