1
+ use snapbox:: assert_data_eq;
2
+
1
3
use crate :: common;
2
4
3
5
#[ test]
@@ -124,7 +126,7 @@ fn register_minimal() {
124
126
. unwrap ( ) ;
125
127
snapbox:: Assert :: new ( )
126
128
. action_env ( "SNAPSHOTS" )
127
- . matches ( snapbox:: file![ "../snapshots/register_minimal.bash" ] , buf ) ;
129
+ . eq ( buf , snapbox:: file![ "../snapshots/register_minimal.bash" ] ) ;
128
130
}
129
131
130
132
#[ test]
@@ -173,19 +175,19 @@ fn complete() {
173
175
-h --global --help action value last hint help
174
176
-V --generate --version quote pacman alias complete "# ;
175
177
let actual = runtime. complete ( input, & term) . unwrap ( ) ;
176
- snapbox :: assert_eq ( expected , actual ) ;
178
+ assert_data_eq ! ( actual , expected ) ;
177
179
178
180
// Issue 5239 (https://github.com/clap-rs/clap/issues/5239)
179
181
let input = "exhaustive hint --file test\t " ;
180
182
let expected = "exhaustive hint --file test % exhaustive hint --file tests/" ;
181
183
let actual = runtime. complete ( input, & term) . unwrap ( ) ;
182
- snapbox :: assert_eq ( expected , actual ) ;
184
+ assert_data_eq ! ( actual , expected ) ;
183
185
184
186
{
185
187
use std:: fs:: File ;
186
188
use std:: path:: Path ;
187
189
188
- let testdir = snapbox:: path :: PathFixture :: mutable_temp ( ) . unwrap ( ) ;
190
+ let testdir = snapbox:: dir :: DirRoot :: mutable_temp ( ) . unwrap ( ) ;
189
191
let testdir_path = testdir. path ( ) . unwrap ( ) ;
190
192
191
193
File :: create ( Path :: new ( testdir_path) . join ( "a_file" ) ) . unwrap ( ) ;
@@ -226,7 +228,7 @@ fn complete() {
226
228
use std:: fs:: File ;
227
229
use std:: path:: Path ;
228
230
229
- let testdir = snapbox:: path :: PathFixture :: mutable_temp ( ) . unwrap ( ) ;
231
+ let testdir = snapbox:: dir :: DirRoot :: mutable_temp ( ) . unwrap ( ) ;
230
232
let testdir_path = testdir. path ( ) . unwrap ( ) ;
231
233
232
234
File :: create ( Path :: new ( testdir_path) . join ( "foo bar.txt" ) ) . unwrap ( ) ;
@@ -243,7 +245,7 @@ fn complete() {
243
245
let input = "exhaustive hint --other \t " ;
244
246
let expected = snapbox:: str![ "exhaustive hint --other % exhaustive hint --other " ] ;
245
247
let actual = runtime. complete ( input, & term) . unwrap ( ) ;
246
- snapbox :: assert_eq ( expected , actual ) ;
248
+ assert_data_eq ! ( actual , expected ) ;
247
249
}
248
250
249
251
#[ test]
0 commit comments