]> Repositorios git - scryer-prolog.git/commit
add tests for `file` module predicates
authorThierry Marianne <[email protected]>
Fri, 19 Sep 2025 20:40:45 +0000 (22:40 +0200)
committerThierry Marianne <[email protected]>
Sun, 21 Sep 2025 20:52:02 +0000 (22:52 +0200)
commit12db664bd94a9c9f00d3eef8341b15067b2fae05
tree720147eabc14332717593d9a259f8af4cb7c5501
parente9ff1348b1ead47f86f008bea6fde713c92cdcf2
add tests for `file` module predicates

reproduce failing `directory_exists/1` with working directory passed as first argument
reproduce failing `delete_directory/1` with ./test directory passed as first argument
reproduce failing `file_size/1` with 2 bytes files passed as first argument
reproduce failing `file_exists/1` with existing file passed as first argument
reproduce failing `file_modification_time/1`, `file_access_time/1` and `file_creation_time/1` with existing file passed as first argument
reproduce failing `directory_files/2` with existing directory passed as first argument
reproduce failing `delete_file/1` with existing file passed as first argument
reproduce failing `make_directory/1` with non-existing directory passed as first argument
reproduce failing `make_directory_path/1` with non-existing path passed as first argument
reproduce failing `path_canonical/2` with non-canonical path passed as first argument
reproduce failing `rename_file/2` with existing file passed as first argument, target file as second arg
revised `directory_exists/1` test case
renamed test files, test directories
use `path_segments/2`, remove path separators
do not write file size to current output
revised `directory_files/2` test
revised `path_canonical/2` test
revised `file_exists/1` test
removed hardcoded expected size
extracted hardcoded directory argument
remove path prefix containing path separator
revised expected ls cmd exit code so that it is platform-agnostic

Signed-off-by: Thierry Marianne <[email protected]>
13 files changed:
tests-pl/issue_delete_directory.pl [new file with mode: 0644]
tests-pl/issue_delete_file.pl [new file with mode: 0644]
tests-pl/issue_directory_exists.pl [new file with mode: 0644]
tests-pl/issue_directory_files.pl [new file with mode: 0644]
tests-pl/issue_file_copy.pl [new file with mode: 0644]
tests-pl/issue_file_exists.pl [new file with mode: 0644]
tests-pl/issue_file_size.pl [new file with mode: 0644]
tests-pl/issue_file_time.pl [new file with mode: 0644]
tests-pl/issue_make_directory.pl [new file with mode: 0644]
tests-pl/issue_make_directory_path.pl [new file with mode: 0644]
tests-pl/issue_path_canonical.pl [new file with mode: 0644]
tests-pl/issue_rename_file.pl [new file with mode: 0644]
tests/scryer/issues.rs