about summary refs log tree commit diff
path: root/lib/tests/filesystem.sh
AgeCommit message (Collapse)AuthorFilesLines
2023-11-01lib.filesystem: Don't test Nix-specific error messagesSilvan Mosberger1-2/+8
In https://github.com/NixOS/nix/pull/9269 the error messages change which would've broken this test.
2023-06-01lib/tests/filesystem.sh: Check success and failure separatelySilvan Mosberger1-46/+37
2023-05-25lib.filesystem.pathType: Fix tests for Nix >= 2.14Silvan Mosberger1-2/+3
2023-05-22lib.filesystem.pathType: Improve error for non-existent pathsSilvan Mosberger1-0/+1
Previously it would fail with error: attribute 'nonexistent' missing at nixpkgs/lib/filesystem.nix:29:10: 28| if dirOf path == path then "directory" 29| else (readDir (dirOf path)).${baseNameOf path}; | ^ 30|
2023-05-22lib.filesystem.pathType: Fix for filesystem root argumentSilvan Mosberger1-0/+3
Previously this function couldn't handle / being passed, it would throw an error: error: attribute '' missing at nixpkgs/lib/filesystem.nix:24:20: 23| */ 24| pathType = path: (readDir (dirOf path)).${baseNameOf path}; | ^ 25| Consequently this also fixes the lib.filesystem.{pathIsDirectory,pathIsRegularFile} functions.
2023-05-22lib.filesystem.pathType and co.: Add testsSilvan Mosberger1-0/+88
Co-Authored-By: Robert Hensing <robert@roberthensing.nl>