Test cases / toml

deft toml diff

Compare two files by structure

1 run on real files, 1 test on generated files, not shown. 0 failed.

Fixed cases

Generated files, compared with ground truth by tools other than deft.

two real Cargo filesPassed

It must print package.name.

deft toml diff ripgrep.toml bat.toml

Input

bat.toml 3.7 KB
[package]
authors = ["David Peter <[email protected]>"]
categories = ["command-line-utilities"]
description = "A cat(1) clone with wings."
homepage = "https://github.com/sharkdp/bat"
license = "MIT OR Apache-2.0"
name = "bat"
repository = "https://github.com/sharkdp/bat"
version = "0.26.1"
exclude = ["assets/syntaxes/*", "assets/themes/*"]
build = "build/main.rs"
edition = '2021'
# You are free to bump MSRV as soon as a reason for bumping emerges.
rust-version = "1.88"

[features]
default = ["application", "git"]
# Feature required for bat the application. Should be disabled when depending on
# bat as a library.
application = [
    "bugreport",
    "build-assets",
    "minimal-application",
]
# Mainly for developers that want to iterate quickly
# Be aware that the included features might change in the future
minimal-application = [
    "clap",
    "etcetera",
    "paging",
    "regex-onig",
    "wild",
]
git = ["gix"] # Support indicating git modifications
paging = [ "shell-words", "grep-cli", "minus"] # Support applying a pager on the output
lessopen = ["execute"] # Support $LESSOPEN preprocessor
build-assets = ["syntect/yaml-load", "syntect/plist-load", "regex", "walkdir"]

# You need to use one of these if you depend on bat as a library:
regex-onig = ["syntect/regex-onig"] # Use the "oniguruma" regex engine
regex-fancy = ["syntect/regex-fancy"] # Use the rust-only "fancy-regex" engine

[dependencies]
nu-ansi-term = "0.50.3"
ansi_colours = "^1.2"
bincode = "1.0"
console = "0.16.2"
flate2 = "1.1"
once_cell = "1.20"
thiserror = "2.0"
wild = { version = "2.2", optional = true }
content_inspector = "0.2.4"
shell-words = { version = "1.1.1", optional = true }
minus = { version = "5.7", optional = true, features = [
  "dynamic_output",
  "search",
] }
unicode-width = "0.2.2"
globset = "0.4"
serde = "1.0"
serde_derive = "1.0"
serde_yaml = "0.9.28"
semver = "1.0"
path_abs = { version = "0.5", default-features = false }
clircle = { version = "0.6.1", default-features = false }
bugreport = { version = "0.6.0", optional = true }
etcetera = { version = "0.11.0", optional = true }
grep-cli = { version = "0.1.12", optional = true }
regex = { version = "1.12.3", optional = true }
walkdir = { version = "2.5", optional = true }
bytesize = { version = "2.3.1" }
encoding_rs = "0.8.35"
execute = { version = "0.3.0", optional = true }
terminal-colorsaurus = "1.0"
unicode-segmentation = "1.13.2"
itertools = "0.14.0"

[dependencies.gix]
version = "0.86"
optional = true
default-features = false
features = ["sha1", "blob-diff"]

[dependencies.syntect]
version = "5.3.0"
default-features = false
features = ["parsing"]

[dependencies.clap]
version = "4.6.1"
optional = true
features = ["wrap_help", "cargo"]

[target.'cfg(target_os = "macos")'.dependencies]
plist = "1.9.0"

[dev-dependencies]
assert_cmd = "2.0.16"
expect-test = "1.5.0"
serial_test = { version = "2.0.0", default-features = false }
predicates = "3.1.4"
wait-timeout = "0.2.1"
tempfile = "3.27.0"
serde = { ve
… 773 more characters
[package]
name = "ripgrep"
version = "15.2.0"  #:version
authors = ["Andrew Gallant <[email protected]>"]
description = """
ripgrep is a line-oriented search tool that recursively searches the current
directory for a regex pattern while respecting gitignore rules. ripgrep has
first class support on Windows, macOS and Linux.
"""
documentation = "https://github.com/BurntSushi/ripgrep"
repository = "https://github.com/BurntSushi/ripgrep"
keywords = ["regex", "grep", "egrep", "search", "pattern"]
categories = ["command-line-utilities", "text-processing"]
license = "Unlicense OR MIT"
exclude = [
  "HomebrewFormula",
  "/.github/",
  "/ci/",
  "/pkg/brew",
  "/benchsuite/",
  "/scripts/",
  "/crates/fuzz",
]
build = "build.rs"
autotests = false
edition.workspace = true
rust-version.workspace = true

[[bin]]
bench = false
path = "crates/core/main.rs"
name = "rg"

[[test]]
name = "integration"
path = "tests/tests.rs"

[workspace]
members = [
  "crates/globset",
  "crates/grep",
  "crates/cli",
  "crates/matcher",
  "crates/pcre2",
  "crates/printer",
  "crates/regex",
  "crates/searcher",
  "crates/ignore",
]

[workspace.package]
edition = "2024"
rust-version = "1.96"

[dependencies]
anyhow = "1.0.75"
bstr = "1.7.0"
grep = { version = "0.4.1", path = "crates/grep" }
ignore = { version = "0.4.29", path = "crates/ignore" }
lexopt = "0.3.0"
log = "0.4.5"
serde_json = "1.0.23"
termcolor = "1.4.0"
textwrap = { version = "0.16.0", default-features = false }

[target.'cfg(all(target_env = "musl", target_pointer_width = "64"))'.dependencies.tikv-jemallocator]
version = "0.7.0"

[dev-dependencies]
serde = "1.0.77"
serde_derive = "1.0.77"
walkdir = "2"

[features]
pcre2 = ["grep/pcre2"]

[profile.release]
debug = 1

[profile.release-lto]
inherits = "release"
opt-level = 3
debug = "none"
strip = "symbols"
debug-assertions = false
overflow-checks = false
lto = "fat"
panic = "abort"
incremental = false
codegen-units = 1

[profile.deb]
inherits = "release-lto"

[package.metadata.deb]
features = ["pcre2"]
section = "utils"
assets = [
  ["target/release/rg", "usr/bin/", "755"],
  ["COPYING", "usr/share/doc/ripgrep/", "644"],
  ["LICENSE-MIT", "usr/share/doc/ripgrep/", "644"],
  ["UNLICENSE", "usr/share/doc/ripgrep/", "644"],
  ["CHANGELOG.md", "usr/share/doc/ripgrep/CHANGELOG", "644"],
  ["README.md", "usr/share/doc/ripgrep/README", "644"],
  ["FAQ.md", "usr/share/doc/ripgrep/FAQ", "644"],
  # The man page is automatically generated by ripgrep's build process, so
  # this file isn't actually committed. Instead, to create a dpkg, either
  # create a deployment/deb directory and copy the man page to it, or use the
  # 'ci/build-deb' script.
  ["deployment/deb/rg.1", "usr/share/man/man1/rg.1", "644"],
  # Similarly for shell completions.
  ["deployment/deb/rg.bash", "usr/share/bash-completion/completions/rg", "644"],
  ["deployment/deb/rg.fish", "usr/share/fish/vendor_completions.d/rg.fish", "644"],
  ["deployment/deb/_rg", "usr/share/zsh/vendor-completions/", "644"],
]
ex
… 223 more characters

Output

No output file. The result is what it printed.

What it printed
ok toml.diff ripgrep.toml bat.toml  96 changes
equal=false changes=[{"path":".package.name","kind":"changed","before":"ripgrep","after":"bat"},{"path":".package.version","kind":"changed","before":"15.2.0","after":"0.26.1"},{"path":".package.authors[0]","kind":"changed","before":"Andrew Gallant <[email protected]>","after":"David Peter <[email protected]>"},{"path":".package.description","kind":"changed","before":"ripgrep is a line-oriented search tool that recursively searches the current\ndirectory for a regex pattern while respecting gitignore rules. ripgrep has\nfirst class support on Windows, macOS and Linux.\n","after":"A cat(1) clone with wings."},{"path":".package.documentation","kind":"removed","before":"https://github.com/BurntSushi/ripgrep"},{"path":".package.repository","kind":"changed","before":"https://github.com/BurntSushi/ripgrep","after":"https://github.com/sharkdp/bat"},{"path":".package.keywords","kind":"removed","before":["regex","grep","egrep","search","pattern"]},{"path":".package.categories[1]","kind":"removed","before":"text-processing"},{"path":".package.license","kind":"changed","before":"Unlicense OR MIT","after":"MIT OR Apache-2.0"},{"path":".package.exclude[0]","kind":"changed","before":"HomebrewFormula","after":"assets/syntaxes/*"},{"path":".package.exclude[1]","kind":"changed","before":"/.github/","after":"assets/themes/*"},{"path":".package.exclude[2]","kind":"removed","before":"/ci/"},{"path":".package.exclude[3]","kind":"removed","before":"/pkg/brew"},{"path":".package.exclude[4]","kind":"removed","before":"/benchsuite/"},{"path":".package.exclude[5]","kind":"removed","before":"/scripts/"},{"path":".package.exclude[6]","kind":"removed","before":"/crates/fuzz"},{"path":".package.build","kind":"changed","before":"build.rs","after":"build/main.rs"},{"path":".package.autotests","kind":"removed","before":false},{"path":".package.edition","kind":"changed","before":{"workspace":true},"after":"2021"},{"path":".package[\"rust-version\"]","kind":"changed","before":{"workspace":true},"after":"1.88"},{"path":".package.metadata","kind":"removed","before":{"deb":{"features":["pcre2"],"section":"utils","assets":[["target/release/rg","usr/bin/","755"],["COPYING","usr/share/doc/ripgrep/","644"],["LICENSE-MIT","usr/share/doc/ripgrep/","644"],["UNLICENSE","usr/share/doc/ripgrep/","644"],["CHANGELOG.md","usr/share/doc/ripgrep/CHANGELOG","644"],["README.md","usr/share/doc/ripgrep/README","644"],["FAQ.md","usr/share/doc/ripgrep/FAQ","644"],["deployment/deb/rg.1","usr/share/man/man1/rg.1","644"],["deployment/deb/rg.bash","usr/share/bash-completion/completions/rg","644"],["deployment/deb/rg.fish","usr/share/fish/vendor_completions.d/rg.fish","644"],["deployment/deb/_rg","usr/share/zsh/vendor-completions/","644"]],"extended-description":"ripgrep (rg) recursively searches your current directory for a regex pattern.\nBy default, ripgrep will respect your .gitignore and automatically skip hidden\nfiles/directories and binary files.\n"}}},{
… 7246 more characters