summaryrefslogtreecommitdiffstats
path: root/vendor/snapbox
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 18:31:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 18:31:44 +0000
commitc23a457e72abe608715ac76f076f47dc42af07a5 (patch)
tree2772049aaf84b5c9d0ed12ec8d86812f7a7904b6 /vendor/snapbox
parentReleasing progress-linux version 1.73.0+dfsg1-1~progress7.99u1. (diff)
downloadrustc-c23a457e72abe608715ac76f076f47dc42af07a5.tar.xz
rustc-c23a457e72abe608715ac76f076f47dc42af07a5.zip
Merging upstream version 1.74.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/snapbox')
-rw-r--r--vendor/snapbox/.cargo-checksum.json2
-rw-r--r--vendor/snapbox/Cargo.lock202
-rw-r--r--vendor/snapbox/Cargo.toml38
-rw-r--r--vendor/snapbox/LICENSE-MIT2
-rw-r--r--vendor/snapbox/examples/snap-example-fixture.rs3
-rw-r--r--vendor/snapbox/src/bin/snap-fixture.rs3
-rw-r--r--vendor/snapbox/src/cmd.rs2
-rw-r--r--vendor/snapbox/src/data.rs270
-rw-r--r--vendor/snapbox/src/lib.rs2
-rw-r--r--vendor/snapbox/src/path.rs6
-rw-r--r--vendor/snapbox/src/substitutions.rs2
11 files changed, 367 insertions, 165 deletions
diff --git a/vendor/snapbox/.cargo-checksum.json b/vendor/snapbox/.cargo-checksum.json
index 98e8dbe0e..e3e324dee 100644
--- a/vendor/snapbox/.cargo-checksum.json
+++ b/vendor/snapbox/.cargo-checksum.json
@@ -1 +1 @@
-{"files":{"Cargo.lock":"ca67707be4b368f67cf8793a22bcafce8b7b203d40d6a203bb18117bb5e24ef1","Cargo.toml":"ac9695783fce8ef560f440b5cccc7d2e76dc19852e254d096320c164a3d4679c","LICENSE-APACHE":"c6596eb7be8581c18be736c846fb9173b69eccf6ef94c5135893ec56bd92ba08","LICENSE-MIT":"ec676bb3166bb11d74f8fbd05d77d8ab7449950176ccc969ffcdb151a5da7fd7","README.md":"8ae45cfbc76984049c97e7bdee5e0a6709f2bff442895e0c08701a71338aa0f9","examples/snap-example-fixture.rs":"3e60c11a785b24b3e9997d5e66e0839179f23b105451509d6faf280819e75fdb","src/action.rs":"a451e85e74fe43b5162a144927151e3785ef36c8d67f16f6ec3da3c6f371ca12","src/assert.rs":"2fe76edef1fd05a8eadfa6e8a6b1dce8629b6e4f1fd4ce85d98b1a51eafacac4","src/bin/snap-fixture.rs":"3e60c11a785b24b3e9997d5e66e0839179f23b105451509d6faf280819e75fdb","src/cmd.rs":"a4c1a3b0a39be6c012d5c661e6c06a121b12b9458a6f5b886163c65f251a1974","src/data.rs":"03ec325655b3a95b9963b8856a8eca3bb6720dbf89685f438159c468bc6d6924","src/error.rs":"ed67eaa4e134937e1f014a0f5555985d26a021bd7034e2928ff3e46f73d7834a","src/harness.rs":"1035e9cca946671c8ccf1604e549355308859a43938b35a8c0d1aa452448d146","src/lib.rs":"2599d022ee5b3f0230f6e4927fece30cd25688aeefdbfb37300ac5a2b26cb15e","src/path.rs":"7a554c93a4811072c225931fe56a47c7cdd3d83dfc66aeccbebc10e290bdd2c2","src/report/color.rs":"721e50e3d4fa4b7a0f2b1f32f86b70ba886e5dba18251b26c6fde45981d205fd","src/report/diff.rs":"5821817a6729084e8eb48818b5c3fccbdcbe48b35842d101ff33c4b8208c13c6","src/report/mod.rs":"84bd389fff126b5a22790865417c3b8942cced343d56659ad9f8b568e3d62902","src/substitutions.rs":"e31dd94d4d2426384f8995ad3e827205c7fe836859f1e48be411998f0b5c2035","src/utils/lines.rs":"9a8eff80b4eced8042cecd2a5bf689365a9ceeea8b4239dcee22a6daad2522ec","src/utils/mod.rs":"61e6a1c2bbefa33a7f8af4068a42a7ad31bfefa90803610374f28be4a2f3b9c3"},"package":"f6bccd62078347f89a914e3004d94582e13824d4e3d8a816317862884c423835"} \ No newline at end of file
+{"files":{"Cargo.lock":"dabf058307b37fa39652cea5da44b18818fb4b08daf1d5488f778036865ecd86","Cargo.toml":"a63174d5bff2bfb8ea394cf4a0b5ea1b219bf10d58625a17d58c282a1c1b5e85","LICENSE-APACHE":"c6596eb7be8581c18be736c846fb9173b69eccf6ef94c5135893ec56bd92ba08","LICENSE-MIT":"6efb0476a1cc085077ed49357026d8c173bf33017278ef440f222fb9cbcb66e6","README.md":"8ae45cfbc76984049c97e7bdee5e0a6709f2bff442895e0c08701a71338aa0f9","examples/snap-example-fixture.rs":"794ba42841b44bed6a274cfad05b47b2882a30e925b49e010af85e9cb348a035","src/action.rs":"a451e85e74fe43b5162a144927151e3785ef36c8d67f16f6ec3da3c6f371ca12","src/assert.rs":"2fe76edef1fd05a8eadfa6e8a6b1dce8629b6e4f1fd4ce85d98b1a51eafacac4","src/bin/snap-fixture.rs":"794ba42841b44bed6a274cfad05b47b2882a30e925b49e010af85e9cb348a035","src/cmd.rs":"348b5072f898db38dc83eb01a83463e0f523ef9bf78e73edb6517be089cfd70c","src/data.rs":"a28fb56fc40eb8f139a75a7dec0086b22603f93663631cab6deea5418d57865b","src/error.rs":"ed67eaa4e134937e1f014a0f5555985d26a021bd7034e2928ff3e46f73d7834a","src/harness.rs":"1035e9cca946671c8ccf1604e549355308859a43938b35a8c0d1aa452448d146","src/lib.rs":"e705d54d878ccfd88f020b97d6a6b6868d9db04f2dec8e04f1b39d372b8d20d4","src/path.rs":"d1ed8f92ed8fd42a44d18bfead92ba40e1e3b73e3ac474ad7e85606f7bc8c20a","src/report/color.rs":"721e50e3d4fa4b7a0f2b1f32f86b70ba886e5dba18251b26c6fde45981d205fd","src/report/diff.rs":"5821817a6729084e8eb48818b5c3fccbdcbe48b35842d101ff33c4b8208c13c6","src/report/mod.rs":"84bd389fff126b5a22790865417c3b8942cced343d56659ad9f8b568e3d62902","src/substitutions.rs":"2c2433e6290b40c64f3e508625c4ed1229f01aaa5ccb8add09cbee2fe84b1ae2","src/utils/lines.rs":"9a8eff80b4eced8042cecd2a5bf689365a9ceeea8b4239dcee22a6daad2522ec","src/utils/mod.rs":"61e6a1c2bbefa33a7f8af4068a42a7ad31bfefa90803610374f28be4a2f3b9c3"},"package":"7b439536a42c43be148b610c7f7f968fb79a457254910a9cb20900da73cd3271"} \ No newline at end of file
diff --git a/vendor/snapbox/Cargo.lock b/vendor/snapbox/Cargo.lock
index 4db51fbf4..a1e32543c 100644
--- a/vendor/snapbox/Cargo.lock
+++ b/vendor/snapbox/Cargo.lock
@@ -28,30 +28,29 @@ dependencies = [
[[package]]
name = "anstream"
-version = "0.3.0"
+version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9e579a7752471abc2a8268df8b20005e3eadd975f585398f17efcfd8d4927371"
+checksum = "bff2cf94a3dbe2d57cbd56485e1bd7436455058034d6c2d47be51d4e5e4bc6ab"
dependencies = [
"anstyle",
"anstyle-parse",
"anstyle-query",
"anstyle-wincon",
"colorchoice",
- "is-terminal",
"utf8parse",
]
[[package]]
name = "anstyle"
-version = "1.0.0"
+version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "41ed9a86bf92ae6580e0a31281f65a1b1d867c0cc68d5346e2ae128dddfa6a7d"
+checksum = "15c4c2c83f81532e5845a733998b6971faca23490340a418e9b72a3ec9de12ea"
[[package]]
name = "anstyle-parse"
-version = "0.2.0"
+version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e765fd216e48e067936442276d1d57399e37bce53c264d6fefbe298080cb57ee"
+checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333"
dependencies = [
"utf8parse",
]
@@ -67,9 +66,9 @@ dependencies = [
[[package]]
name = "anstyle-wincon"
-version = "1.0.0"
+version = "3.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4bcd8291a340dd8ac70e18878bc4501dd7b4ff970cfa21c207d36ece51ea88fd"
+checksum = "0238ca56c96dfa37bdf7c373c8886dd591322500aceeeccdb2216fe06dc2f796"
dependencies = [
"anstyle",
"windows-sys 0.48.0",
@@ -97,6 +96,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
+name = "bitflags"
+version = "2.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635"
+
+[[package]]
name = "bstr"
version = "0.2.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -107,9 +112,12 @@ dependencies = [
[[package]]
name = "cc"
-version = "1.0.79"
+version = "1.0.83"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f"
+checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0"
+dependencies = [
+ "libc",
+]
[[package]]
name = "cfg-if"
@@ -123,7 +131,7 @@ version = "4.0.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0acbd8d28a0a60d7108d7ae850af6ba34cf2d1257fc646980e5f97ce14275966"
dependencies = [
- "bitflags",
+ "bitflags 1.3.2",
"clap_derive",
"clap_lex",
"is-terminal",
@@ -196,13 +204,13 @@ checksum = "453440c271cf5577fd2a40e4942540cb7d0d2f85e27c8d07dd0023c925a67541"
[[package]]
name = "errno"
-version = "0.2.8"
+version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1"
+checksum = "6b30f669a7961ef1631673d2766cc92f52d64f7ef354d4fe0ddfd30ed52f0f4f"
dependencies = [
"errno-dragonfly",
"libc",
- "winapi",
+ "windows-sys 0.48.0",
]
[[package]]
@@ -290,9 +298,9 @@ dependencies = [
[[package]]
name = "hermit-abi"
-version = "0.3.1"
+version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286"
+checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b"
[[package]]
name = "ignore"
@@ -322,25 +330,14 @@ dependencies = [
]
[[package]]
-name = "io-lifetimes"
-version = "1.0.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1abeb7a0dd0f8181267ff8adc397075586500b81b28a73e8a0208b00fc170fb3"
-dependencies = [
- "libc",
- "windows-sys 0.45.0",
-]
-
-[[package]]
name = "is-terminal"
-version = "0.4.4"
+version = "0.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "21b6b32576413a8e69b90e952e4a026476040d81017b80445deda5f2d3921857"
+checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b"
dependencies = [
- "hermit-abi 0.3.1",
- "io-lifetimes",
+ "hermit-abi 0.3.2",
"rustix",
- "windows-sys 0.45.0",
+ "windows-sys 0.48.0",
]
[[package]]
@@ -357,9 +354,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
[[package]]
name = "libc"
-version = "0.2.139"
+version = "0.2.147"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79"
+checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3"
[[package]]
name = "libtest-mimic"
@@ -374,9 +371,9 @@ dependencies = [
[[package]]
name = "linux-raw-sys"
-version = "0.1.4"
+version = "0.4.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4"
+checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503"
[[package]]
name = "litrs"
@@ -503,7 +500,7 @@ version = "0.2.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a"
dependencies = [
- "bitflags",
+ "bitflags 1.3.2",
]
[[package]]
@@ -540,16 +537,15 @@ checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342"
[[package]]
name = "rustix"
-version = "0.36.8"
+version = "0.38.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f43abb88211988493c1abb44a70efa56ff0ce98f233b7b276146f1f3f7ba9644"
+checksum = "19ed4fa021d81c8392ce04db050a3da9a60299050b7ae1cf482d862b54a7218f"
dependencies = [
- "bitflags",
+ "bitflags 2.4.0",
"errno",
- "io-lifetimes",
"libc",
"linux-raw-sys",
- "windows-sys 0.45.0",
+ "windows-sys 0.48.0",
]
[[package]]
@@ -606,7 +602,7 @@ checksum = "62ac7f900db32bf3fd12e0117dd3dc4da74bc52ebaac97f39668446d89694803"
[[package]]
name = "snapbox"
-version = "0.4.11"
+version = "0.4.13"
dependencies = [
"anstream",
"anstyle",
@@ -627,14 +623,14 @@ dependencies = [
"tempfile",
"wait-timeout",
"walkdir",
- "windows-sys 0.45.0",
+ "windows-sys 0.48.0",
]
[[package]]
name = "snapbox-macros"
-version = "0.3.4"
+version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eaaf09df9f0eeae82be96290918520214530e738a7fe5a351b0f24cf77c0ca31"
+checksum = "ed1559baff8a696add3322b9be3e940d433e7bb4e38d79017205fd37ff28b28e"
dependencies = [
"anstream",
]
@@ -772,22 +768,13 @@ version = "0.42.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7"
dependencies = [
- "windows_aarch64_gnullvm 0.42.1",
- "windows_aarch64_msvc 0.42.1",
- "windows_i686_gnu 0.42.1",
- "windows_i686_msvc 0.42.1",
- "windows_x86_64_gnu 0.42.1",
- "windows_x86_64_gnullvm 0.42.1",
- "windows_x86_64_msvc 0.42.1",
-]
-
-[[package]]
-name = "windows-sys"
-version = "0.45.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0"
-dependencies = [
- "windows-targets 0.42.1",
+ "windows_aarch64_gnullvm 0.42.2",
+ "windows_aarch64_msvc 0.42.2",
+ "windows_i686_gnu 0.42.2",
+ "windows_i686_msvc 0.42.2",
+ "windows_x86_64_gnu 0.42.2",
+ "windows_x86_64_gnullvm 0.42.2",
+ "windows_x86_64_msvc 0.42.2",
]
[[package]]
@@ -796,119 +783,104 @@ version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
dependencies = [
- "windows-targets 0.48.0",
+ "windows-targets",
]
[[package]]
name = "windows-targets"
-version = "0.42.1"
+version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7"
+checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c"
dependencies = [
- "windows_aarch64_gnullvm 0.42.1",
- "windows_aarch64_msvc 0.42.1",
- "windows_i686_gnu 0.42.1",
- "windows_i686_msvc 0.42.1",
- "windows_x86_64_gnu 0.42.1",
- "windows_x86_64_gnullvm 0.42.1",
- "windows_x86_64_msvc 0.42.1",
-]
-
-[[package]]
-name = "windows-targets"
-version = "0.48.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5"
-dependencies = [
- "windows_aarch64_gnullvm 0.48.0",
- "windows_aarch64_msvc 0.48.0",
- "windows_i686_gnu 0.48.0",
- "windows_i686_msvc 0.48.0",
- "windows_x86_64_gnu 0.48.0",
- "windows_x86_64_gnullvm 0.48.0",
- "windows_x86_64_msvc 0.48.0",
+ "windows_aarch64_gnullvm 0.48.5",
+ "windows_aarch64_msvc 0.48.5",
+ "windows_i686_gnu 0.48.5",
+ "windows_i686_msvc 0.48.5",
+ "windows_x86_64_gnu 0.48.5",
+ "windows_x86_64_gnullvm 0.48.5",
+ "windows_x86_64_msvc 0.48.5",
]
[[package]]
name = "windows_aarch64_gnullvm"
-version = "0.42.1"
+version = "0.42.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608"
+checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8"
[[package]]
name = "windows_aarch64_gnullvm"
-version = "0.48.0"
+version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc"
+checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
[[package]]
name = "windows_aarch64_msvc"
-version = "0.42.1"
+version = "0.42.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7"
+checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43"
[[package]]
name = "windows_aarch64_msvc"
-version = "0.48.0"
+version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3"
+checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
[[package]]
name = "windows_i686_gnu"
-version = "0.42.1"
+version = "0.42.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640"
+checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f"
[[package]]
name = "windows_i686_gnu"
-version = "0.48.0"
+version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241"
+checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
[[package]]
name = "windows_i686_msvc"
-version = "0.42.1"
+version = "0.42.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605"
+checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060"
[[package]]
name = "windows_i686_msvc"
-version = "0.48.0"
+version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00"
+checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
[[package]]
name = "windows_x86_64_gnu"
-version = "0.42.1"
+version = "0.42.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45"
+checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36"
[[package]]
name = "windows_x86_64_gnu"
-version = "0.48.0"
+version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1"
+checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
[[package]]
name = "windows_x86_64_gnullvm"
-version = "0.42.1"
+version = "0.42.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463"
+checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3"
[[package]]
name = "windows_x86_64_gnullvm"
-version = "0.48.0"
+version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953"
+checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
[[package]]
name = "windows_x86_64_msvc"
-version = "0.42.1"
+version = "0.42.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd"
+checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0"
[[package]]
name = "windows_x86_64_msvc"
-version = "0.48.0"
+version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a"
+checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
diff --git a/vendor/snapbox/Cargo.toml b/vendor/snapbox/Cargo.toml
index 5ca8579a7..4e8005c6b 100644
--- a/vendor/snapbox/Cargo.toml
+++ b/vendor/snapbox/Cargo.toml
@@ -11,9 +11,9 @@
[package]
edition = "2021"
-rust-version = "1.64.0"
+rust-version = "1.70.0"
name = "snapbox"
-version = "0.4.11"
+version = "0.4.13"
include = [
"build.rs",
"src/**/*",
@@ -39,55 +39,55 @@ repository = "https://github.com/assert-rs/trycmd/"
[package.metadata.docs.rs]
all-features = true
-rustdoc-args = [
- "--cfg",
- "docsrs",
-]
cargo-args = [
"-Zunstable-options",
"-Zrustdoc-scrape-examples",
]
+rustdoc-args = [
+ "--cfg",
+ "docsrs",
+]
[[package.metadata.release.pre-release-replacements]]
file = "CHANGELOG.md"
-search = "Unreleased"
-replace = "{{version}}"
min = 1
+replace = "{{version}}"
+search = "Unreleased"
[[package.metadata.release.pre-release-replacements]]
+exactly = 1
file = "CHANGELOG.md"
-search = '\.\.\.HEAD'
replace = "...{{tag_name}}"
-exactly = 1
+search = '\.\.\.HEAD'
[[package.metadata.release.pre-release-replacements]]
file = "CHANGELOG.md"
-search = "ReleaseDate"
-replace = "{{date}}"
min = 1
+replace = "{{date}}"
+search = "ReleaseDate"
[[package.metadata.release.pre-release-replacements]]
+exactly = 1
file = "CHANGELOG.md"
-search = "<!-- next-header -->"
replace = """
<!-- next-header -->
## [Unreleased] - ReleaseDate
"""
-exactly = 1
+search = "<!-- next-header -->"
[[package.metadata.release.pre-release-replacements]]
+exactly = 1
file = "CHANGELOG.md"
-search = "<!-- next-url -->"
replace = """
<!-- next-url -->
[Unreleased]: https://github.com/assert-rs/trycmd/compare/{{tag_name}}...HEAD"""
-exactly = 1
+search = "<!-- next-url -->"
[[bin]]
name = "snap-fixture"
[dependencies.anstream]
-version = "0.3.0"
+version = "0.6.0"
optional = true
[dependencies.anstyle]
@@ -142,7 +142,7 @@ features = ["inline"]
optional = true
[dependencies.snapbox-macros]
-version = "0.3.4"
+version = "0.3.6"
[dependencies.tempfile]
version = "3.0"
@@ -201,6 +201,6 @@ version = "0.2.137"
optional = true
[target."cfg(windows)".dependencies.windows-sys]
-version = "0.45.0"
+version = "0.48.0"
features = ["Win32_Foundation"]
optional = true
diff --git a/vendor/snapbox/LICENSE-MIT b/vendor/snapbox/LICENSE-MIT
index 6338906f7..a2d01088b 100644
--- a/vendor/snapbox/LICENSE-MIT
+++ b/vendor/snapbox/LICENSE-MIT
@@ -1,4 +1,4 @@
-Copyright (c) 2021 Individual contributors
+Copyright (c) Individual contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/vendor/snapbox/examples/snap-example-fixture.rs b/vendor/snapbox/examples/snap-example-fixture.rs
index 6e13448a7..7e21fc647 100644
--- a/vendor/snapbox/examples/snap-example-fixture.rs
+++ b/vendor/snapbox/examples/snap-example-fixture.rs
@@ -43,7 +43,8 @@ fn run() -> Result<(), Box<dyn Error>> {
let code = env::var("exit")
.ok()
.map(|v| v.parse::<i32>())
- .map_or(Ok(None), |r| r.map(Some))?
+ .map(|r| r.map(Some))
+ .unwrap_or(Ok(None))?
.unwrap_or(0);
process::exit(code);
}
diff --git a/vendor/snapbox/src/bin/snap-fixture.rs b/vendor/snapbox/src/bin/snap-fixture.rs
index 6e13448a7..7e21fc647 100644
--- a/vendor/snapbox/src/bin/snap-fixture.rs
+++ b/vendor/snapbox/src/bin/snap-fixture.rs
@@ -43,7 +43,8 @@ fn run() -> Result<(), Box<dyn Error>> {
let code = env::var("exit")
.ok()
.map(|v| v.parse::<i32>())
- .map_or(Ok(None), |r| r.map(Some))?
+ .map(|r| r.map(Some))
+ .unwrap_or(Ok(None))?
.unwrap_or(0);
process::exit(code);
}
diff --git a/vendor/snapbox/src/cmd.rs b/vendor/snapbox/src/cmd.rs
index 8529852f9..3b2a19f70 100644
--- a/vendor/snapbox/src/cmd.rs
+++ b/vendor/snapbox/src/cmd.rs
@@ -1013,7 +1013,7 @@ pub use snapbox_macros::cargo_bin;
pub fn cargo_bin(name: &str) -> std::path::PathBuf {
let file_name = format!("{}{}", name, std::env::consts::EXE_SUFFIX);
let target_dir = target_dir();
- target_dir.join(&file_name)
+ target_dir.join(file_name)
}
// Adapted from
diff --git a/vendor/snapbox/src/data.rs b/vendor/snapbox/src/data.rs
index ab4432c1e..b892ffd1e 100644
--- a/vendor/snapbox/src/data.rs
+++ b/vendor/snapbox/src/data.rs
@@ -14,20 +14,15 @@ enum DataInner {
Json(serde_json::Value),
}
-#[derive(Clone, Debug, PartialEq, Eq, Copy, Hash)]
+#[derive(Clone, Debug, PartialEq, Eq, Copy, Hash, Default)]
pub enum DataFormat {
Binary,
+ #[default]
Text,
#[cfg(feature = "json")]
Json,
}
-impl Default for DataFormat {
- fn default() -> Self {
- DataFormat::Text
- }
-}
-
impl Data {
/// Mark the data as binary (no post-processing)
pub fn binary(raw: impl Into<Vec<u8>>) -> Self {
@@ -63,24 +58,24 @@ impl Data {
let data = match data_format {
Some(df) => match df {
DataFormat::Binary => {
- let data = std::fs::read(&path)
+ let data = std::fs::read(path)
.map_err(|e| format!("Failed to read {}: {}", path.display(), e))?;
Self::binary(data)
}
DataFormat::Text => {
- let data = std::fs::read_to_string(&path)
+ let data = std::fs::read_to_string(path)
.map_err(|e| format!("Failed to read {}: {}", path.display(), e))?;
Self::text(data)
}
#[cfg(feature = "json")]
DataFormat::Json => {
- let data = std::fs::read_to_string(&path)
+ let data = std::fs::read_to_string(path)
.map_err(|e| format!("Failed to read {}: {}", path.display(), e))?;
Self::json(serde_json::from_str::<serde_json::Value>(&data).unwrap())
}
},
None => {
- let data = std::fs::read(&path)
+ let data = std::fs::read(path)
.map_err(|e| format!("Failed to read {}: {}", path.display(), e))?;
let data = Self::binary(data);
match path
@@ -334,11 +329,14 @@ fn normalize_value(value: &mut serde_json::Value, op: fn(&str) -> String) {
*str = op(str);
}
serde_json::Value::Array(arr) => {
- arr.iter_mut().for_each(|value| normalize_value(value, op));
+ for value in arr.iter_mut() {
+ normalize_value(value, op)
+ }
}
serde_json::Value::Object(obj) => {
- obj.iter_mut()
- .for_each(|(_, value)| normalize_value(value, op));
+ for (_, value) in obj.iter_mut() {
+ normalize_value(value, op)
+ }
}
_ => {}
}
@@ -360,15 +358,44 @@ fn normalize_value_matches(
*act = substitutions.normalize(act, exp);
}
(Array(act), Array(exp)) => {
- act.iter_mut()
- .zip(exp)
- .for_each(|(a, e)| normalize_value_matches(a, e, substitutions));
+ let wildcard = String("{...}".to_string());
+ let mut sections = exp.split(|e| e == &wildcard).peekable();
+ let mut processed = 0;
+ while let Some(expected_subset) = sections.next() {
+ // Process all values in the current section
+ if !expected_subset.is_empty() {
+ let actual_subset = &mut act[processed..processed + expected_subset.len()];
+ for (a, e) in actual_subset.iter_mut().zip(expected_subset) {
+ normalize_value_matches(a, e, substitutions);
+ }
+ processed += expected_subset.len();
+ }
+
+ if let Some(next_section) = sections.peek() {
+ // If the next section has nothing in it, replace from processed to end with
+ // a single "{...}"
+ if next_section.is_empty() {
+ act.splice(processed.., vec![wildcard.clone()]);
+ processed += 1;
+ } else {
+ let first = next_section.first().unwrap();
+ // Replace everything up until the value we are looking for with
+ // a single "{...}".
+ if let Some(index) = act.iter().position(|v| v == first) {
+ act.splice(processed..index, vec![wildcard.clone()]);
+ processed += 1;
+ } else {
+ // If we cannot find the value we are looking for return early
+ break;
+ }
+ }
+ }
+ }
}
(Object(act), Object(exp)) => {
- act.iter_mut()
- .zip(exp)
- .filter(|(a, e)| a.0 == e.0)
- .for_each(|(a, e)| normalize_value_matches(a.1, e.1, substitutions));
+ for (a, e) in act.iter_mut().zip(exp).filter(|(a, e)| a.0 == e.0) {
+ normalize_value_matches(a.1, e.1, substitutions)
+ }
}
(_, _) => {}
}
@@ -709,4 +736,205 @@ mod test {
assert_ne!(exp, act);
}
}
+
+ #[test]
+ #[cfg(feature = "json")]
+ fn json_normalize_wildcard_object_first() {
+ let exp = json!({
+ "people": [
+ "{...}",
+ {
+ "name": "three",
+ "nickname": "3",
+ }
+ ]
+ });
+ let expected = Data::json(exp);
+ let actual = json!({
+ "people": [
+ {
+ "name": "one",
+ "nickname": "1",
+ },
+ {
+ "name": "two",
+ "nickname": "2",
+ },
+ {
+ "name": "three",
+ "nickname": "3",
+ }
+ ]
+ });
+ let actual = Data::json(actual).normalize(NormalizeMatches {
+ substitutions: &Default::default(),
+ pattern: &expected,
+ });
+ if let (DataInner::Json(exp), DataInner::Json(act)) = (expected.inner, actual.inner) {
+ assert_eq!(exp, act);
+ }
+ }
+
+ #[test]
+ #[cfg(feature = "json")]
+ fn json_normalize_wildcard_array_first() {
+ let exp = json!([
+ "{...}",
+ {
+ "name": "three",
+ "nickname": "3",
+ }
+ ]);
+ let expected = Data::json(exp);
+ let actual = json!([
+ {
+ "name": "one",
+ "nickname": "1",
+ },
+ {
+ "name": "two",
+ "nickname": "2",
+ },
+ {
+ "name": "three",
+ "nickname": "3",
+ }
+ ]);
+ let actual = Data::json(actual).normalize(NormalizeMatches {
+ substitutions: &Default::default(),
+ pattern: &expected,
+ });
+ if let (DataInner::Json(exp), DataInner::Json(act)) = (expected.inner, actual.inner) {
+ assert_eq!(exp, act);
+ }
+ }
+
+ #[test]
+ #[cfg(feature = "json")]
+ fn json_normalize_wildcard_array_first_last() {
+ let exp = json!([
+ "{...}",
+ {
+ "name": "two",
+ "nickname": "2",
+ },
+ "{...}"
+ ]);
+ let expected = Data::json(exp);
+ let actual = json!([
+ {
+ "name": "one",
+ "nickname": "1",
+ },
+ {
+ "name": "two",
+ "nickname": "2",
+ },
+ {
+ "name": "three",
+ "nickname": "3",
+ },
+ {
+ "name": "four",
+ "nickname": "4",
+ }
+ ]);
+ let actual = Data::json(actual).normalize(NormalizeMatches {
+ substitutions: &Default::default(),
+ pattern: &expected,
+ });
+ if let (DataInner::Json(exp), DataInner::Json(act)) = (expected.inner, actual.inner) {
+ assert_eq!(exp, act);
+ }
+ }
+
+ #[test]
+ #[cfg(feature = "json")]
+ fn json_normalize_wildcard_array_middle_last() {
+ let exp = json!([
+ {
+ "name": "one",
+ "nickname": "1",
+ },
+ "{...}",
+ {
+ "name": "three",
+ "nickname": "3",
+ },
+ "{...}"
+ ]);
+ let expected = Data::json(exp);
+ let actual = json!([
+ {
+ "name": "one",
+ "nickname": "1",
+ },
+ {
+ "name": "two",
+ "nickname": "2",
+ },
+ {
+ "name": "three",
+ "nickname": "3",
+ },
+ {
+ "name": "four",
+ "nickname": "4",
+ },
+ {
+ "name": "five",
+ "nickname": "5",
+ }
+ ]);
+ let actual = Data::json(actual).normalize(NormalizeMatches {
+ substitutions: &Default::default(),
+ pattern: &expected,
+ });
+ if let (DataInner::Json(exp), DataInner::Json(act)) = (expected.inner, actual.inner) {
+ assert_eq!(exp, act);
+ }
+ }
+
+ #[test]
+ #[cfg(feature = "json")]
+ fn json_normalize_wildcard_array_middle_last_early_return() {
+ let exp = json!([
+ {
+ "name": "one",
+ "nickname": "1",
+ },
+ "{...}",
+ {
+ "name": "three",
+ "nickname": "3",
+ },
+ "{...}"
+ ]);
+ let expected = Data::json(exp);
+ let actual = json!([
+ {
+ "name": "one",
+ "nickname": "1",
+ },
+ {
+ "name": "two",
+ "nickname": "2",
+ },
+ {
+ "name": "four",
+ "nickname": "4",
+ },
+ {
+ "name": "five",
+ "nickname": "5",
+ }
+ ]);
+ let actual_normalized = Data::json(actual.clone()).normalize(NormalizeMatches {
+ substitutions: &Default::default(),
+ pattern: &expected,
+ });
+ if let DataInner::Json(act) = actual_normalized.inner {
+ assert_eq!(act, actual);
+ }
+ }
}
diff --git a/vendor/snapbox/src/lib.rs b/vendor/snapbox/src/lib.rs
index 61419fd5e..7084c15d2 100644
--- a/vendor/snapbox/src/lib.rs
+++ b/vendor/snapbox/src/lib.rs
@@ -128,7 +128,7 @@ pub type Result<T, E = Error> = std::result::Result<T, E>;
/// ```rust
/// let output = "something";
/// let expected = "something";
-/// snapbox::assert_matches(expected, output);
+/// snapbox::assert_eq(expected, output);
/// ```
#[track_caller]
pub fn assert_eq(expected: impl Into<crate::Data>, actual: impl Into<crate::Data>) {
diff --git a/vendor/snapbox/src/path.rs b/vendor/snapbox/src/path.rs
index 9cd1e3f94..523b03822 100644
--- a/vendor/snapbox/src/path.rs
+++ b/vendor/snapbox/src/path.rs
@@ -40,8 +40,8 @@ impl PathFixture {
#[cfg(feature = "path")]
pub fn mutable_at(target: &std::path::Path) -> Result<Self, crate::Error> {
- let _ = std::fs::remove_dir_all(&target);
- std::fs::create_dir_all(&target)
+ let _ = std::fs::remove_dir_all(target);
+ std::fs::create_dir_all(target)
.map_err(|e| format!("Failed to create {}: {}", target.display(), e))?;
Ok(Self(PathFixtureInner::MutablePath(target.to_owned())))
}
@@ -577,7 +577,7 @@ fn copy_stats(
dest: &std::path::Path,
) -> Result<(), std::io::Error> {
let src_mtime = filetime::FileTime::from_last_modification_time(source_meta);
- filetime::set_file_mtime(&dest, src_mtime)?;
+ filetime::set_file_mtime(dest, src_mtime)?;
Ok(())
}
diff --git a/vendor/snapbox/src/substitutions.rs b/vendor/snapbox/src/substitutions.rs
index 9c228172b..d0057436c 100644
--- a/vendor/snapbox/src/substitutions.rs
+++ b/vendor/snapbox/src/substitutions.rs
@@ -184,7 +184,7 @@ fn normalize(input: &str, pattern: &str, substitutions: &Substitutions) -> Strin
if let Some(future_pattern_index) = pattern_lines[next_pattern_index..]
.iter()
.enumerate()
- .find(|(_, l)| **l == future_input_line || is_line_elide(**l))
+ .find(|(_, l)| **l == future_input_line || is_line_elide(l))
.map(|(i, _)| next_pattern_index + i)
{
normalized.extend(