File tree Expand file tree Collapse file tree 3 files changed +6
-11
lines changed Expand file tree Collapse file tree 3 files changed +6
-11
lines changed Original file line number Diff line number Diff line change 2323 - uses : actions/checkout@v3
2424 - uses : dtolnay/rust-toolchain@master
2525 with :
26- toolchain : 1.56.1
26+ toolchain : 1.60.0
2727 - name : Test
2828 run : make cargotest
2929
Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ All notable changes to insta and cargo-insta are documented here.
44
55## 1.30.0
66
7+ - Resolved a bug on Windows that caused ` input_file ` not to be written into the
8+ snapshots. (#386 )
79- Snapshots are accepted when running with ` --accept ` even if a test outside
810 insta fails. (#358 )
911- Mark settings drop guard as ` #[must_use] ` .
Original file line number Diff line number Diff line change @@ -310,16 +310,9 @@ impl<'a> SnapshotAssertionContext<'a> {
310310
311311 /// Given a path returns the local path within the workspace.
312312 pub fn localize_path ( & self , p : & Path ) -> Option < PathBuf > {
313- self . cargo_workspace
314- . join ( p)
315- . canonicalize ( )
316- . ok ( )
317- . and_then ( |s| {
318- self . cargo_workspace
319- . canonicalize ( )
320- . ok ( )
321- . and_then ( |cw| s. strip_prefix ( cw) . ok ( ) . map ( |x| x. to_path_buf ( ) ) )
322- } )
313+ let workspace = self . cargo_workspace . canonicalize ( ) . ok ( ) ?;
314+ let p = self . cargo_workspace . join ( p) . canonicalize ( ) . ok ( ) ?;
315+ p. strip_prefix ( & workspace) . ok ( ) . map ( |x| x. to_path_buf ( ) )
323316 }
324317
325318 /// Creates the new snapshot from input values.
You can’t perform that action at this time.
0 commit comments