1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-26 11:41:15 +02:00

Add StorePath tests

This commit is contained in:
Eelco Dolstra 2019-12-05 23:10:16 +01:00
parent bca0afb943
commit ebd89999c2
2 changed files with 94 additions and 2 deletions

View file

@ -6,6 +6,7 @@ pub enum Error {
BadStorePath(std::path::PathBuf),
BadNarInfo,
BadBase32,
StorePathNameEmpty,
StorePathNameTooLong,
BadStorePathName,
NarSizeFieldTooBig,
@ -42,6 +43,7 @@ impl fmt::Display for Error {
Error::BadNarInfo => write!(f, ".narinfo file is corrupt"),
Error::BadStorePath(path) => write!(f, "path '{}' is not a store path", path.display()),
Error::BadBase32 => write!(f, "invalid base32 string"),
Error::StorePathNameEmpty => write!(f, "store path name is empty"),
Error::StorePathNameTooLong => {
write!(f, "store path name is longer than 211 characters")
}