mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-12 08:52:32 +00:00
PhotoCraft's `photocraft-psd` crate (crates/psd at storytold/photocraft 63b641b55e54bf8f5c83efd977fdb16a2c255431) as `craft-psd`: the lossless PSD/PSB model, reader, writer and builder, descriptors, the Photoshop resource files that share its primitives (.abr, .asl, .aco, .act, .ase, .grd, .pat, .atn, .csh, .shc) and the Photoshop blocks of a layered TIFF. The crate had no dependency on any other PhotoCraft crate. Code is unchanged apart from the crate name, craft-libs' rustfmt width, comments that named other PhotoCraft crates, issue references (now `photocraft#N`), and the corpus tests' directory (`CRAFT_PSD_CORPUS` or `corpus/` at the workspace root). Tests, proptests, fuzz targets and fixtures move with it. Part of #778, #786.
25 lines
727 B
Rust
25 lines
727 B
Rust
//! The crate's integration tests, linked into one test binary.
|
|
|
|
mod animation;
|
|
mod atn_contract;
|
|
mod atn_v12;
|
|
mod builder;
|
|
mod corpus;
|
|
mod corpus_atn;
|
|
mod layer_block_order;
|
|
mod malformed;
|
|
mod merged_recovery;
|
|
mod proptests;
|
|
mod roundtrip;
|
|
mod swatch_malformed;
|
|
mod tree;
|
|
|
|
/// A directory of the real-file corpus (feature `corpus`): under `CRAFT_PSD_CORPUS` when set (a
|
|
/// PhotoCraft checkout's `corpus` directory), else `corpus/` at the workspace root.
|
|
#[cfg(feature = "corpus")]
|
|
fn corpus_dir(sub: &str) -> std::path::PathBuf {
|
|
let root = std::env::var_os("CRAFT_PSD_CORPUS")
|
|
.map_or_else(|| std::path::Path::new(env!("CARGO_MANIFEST_DIR")).join("../../corpus"), std::path::PathBuf::from);
|
|
root.join(sub)
|
|
}
|