[package] name = "snapbox" version = "0.6.20" description = "Snapshot testing toolbox" homepage = "https://github.com/assert-rs/trycmd/tree/main/crates/snapbox" documentation = "http://docs.rs/snapbox/" readme = "README.md" categories = ["development-tools::testing"] keywords = ["cli", "test", "assert", "command"] repository.workspace = true license.workspace = true edition.workspace = true rust-version.workspace = true include.workspace = true [package.metadata.docs.rs] all-features = true rustdoc-args = ["--cfg", "docsrs"] cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"] [package.metadata.release] pre-release-replacements = [ {file="CHANGELOG.md", search="Unreleased", replace="{{version}}", min=1}, {file="CHANGELOG.md", search="\\.\\.\\.HEAD", replace="...{{tag_name}}", exactly=1}, {file="CHANGELOG.md", search="ReleaseDate", replace="{{date}}", min=1}, {file="CHANGELOG.md", search="", replace="\n## [Unreleased] - ReleaseDate\n", exactly=1}, {file="CHANGELOG.md", search="", replace="\n[Unreleased]: https://github.com/assert-rs/trycmd/compare/{{tag_name}}...HEAD", exactly=1}, ] [features] default = ["color-auto", "diff"] #! Feature Flags ## Smarter binary file detection detect-encoding = ["dep:content_inspector"] ## Snapshotting of directories dir = ["dep:tempfile", "dep:walkdir", "dep:dunce", "detect-encoding", "dep:filetime"] ## Deprecated since 0.5.11, replaced with `dir` path = ["dir"] ## Snapshotting of commands cmd = ["dep:os_pipe", "dep:wait-timeout", "dep:libc", "dep:windows-sys"] ## Building of examples for snapshotting examples = ["dep:escargot"] ## Regex text substitutions regex = ["dep:regex"] ## Snapshotting of json json = ["structured-data", "dep:serde_json", "dep:serde"] ## Snapshotting of term styling term-svg = ["structured-data", "dep:anstyle-svg"] ## Snapshotting of structured data structured-data = ["dep:serde_json"] ## Extra debugging information debug = ["snapbox-macros/debug", "dep:backtrace"] #! Default Feature Flags ## Fancy diffs on failure diff = ["dep:similar"] ## Colored output support color = ["dep:anstream", "snapbox-macros/color"] ## Auto-detect whether to use colors color-auto = ["color"] [[bin]] name = "snap-fixture" # For `snapbox`s tests only [dependencies] normalize-line-endings = "0.3.0" snapbox-macros = { path = "../snapbox-macros", version = "0.3.10" } content_inspector = { version = "0.2.4", optional = true } tempfile = { version = "3.0", optional = true } walkdir = { version = "2.3.2", optional = true } dunce = { version = "1.0", optional = true } filetime = { version = "0.2.8", optional = true } os_pipe = { version = "1.0", optional = true } wait-timeout = { version = "0.2.0", optional = true } escargot = { version = "0.5.13", optional = true } backtrace = { version = "0.3", optional = true } similar = { version = "2.1.0", features = ["inline"], optional = true } anstyle = "1.0.0" anstream = { version = "0.6.7", optional = true } document-features = { version = "0.2.8", optional = true } serde_json = { version = "1.0.85", optional = true} anstyle-svg = { version = "0.1.3", optional = true } serde = { version = "1.0.198", optional = true } regex = { version = "1.10.4", optional = true, default-features = false, features = ["std"] } [target.'cfg(windows)'.dependencies] windows-sys = { version = "0.59.0", features = ["Win32_Foundation"], optional = true } [target.'cfg(unix)'.dependencies] libc = { version = "0.2.137", optional = true } [dev-dependencies] automod = "1.0.14" [[example]] name = "diff" required-features = ["diff"] [lints] workspace = true