Skip to content

Commit 00a1c47

Browse files
committed
better detection of pre-requisites for symlink test (#1373)
If we are dependent on symlinks, we should be sure that the probe actually detects symlinks.
1 parent 4791e31 commit 00a1c47

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

gix-worktree-state/tests/state/checkout.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,10 @@ fn overwriting_files_and_lone_directories_works() -> crate::Result {
178178
gix_filter::driver::apply::Delay::Forbid,
179179
] {
180180
let mut opts = opts_from_probe();
181+
assert!(
182+
opts.fs.symlink,
183+
"BUG: the probe must detect to be able to generate symlinks"
184+
);
181185
opts.overwrite_existing = true;
182186
opts.filter_process_delay = delay;
183187
opts.destination_is_initially_empty = false;
@@ -197,7 +201,7 @@ fn overwriting_files_and_lone_directories_works() -> crate::Result {
197201
let dir = dir.join("sub-dir");
198202
std::fs::create_dir(&dir)?;
199203

200-
symlink::symlink_dir(empty, dir.join("symlink"))?; // 'symlink' is a symlink to another file
204+
symlink::symlink_dir(empty, dir.join("symlink"))?; // 'symlink' is a symlink to a directory.
201205
Ok(())
202206
},
203207
)?;

0 commit comments

Comments
 (0)