Skip to content

Commit 1942635

Browse files
committed
disable tests on windows
1 parent 854f829 commit 1942635

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

tmc-langs-util/src/task_executor/course_refresher.rs

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,7 @@ fn set_permissions(path: &Path) -> Result<(), UtilError> {
379379
}
380380

381381
#[cfg(test)]
382+
#[cfg(unix)] // not used on windows
382383
mod test {
383384
use std::io::Read;
384385

@@ -565,14 +566,27 @@ courses:
565566
log::debug!("{}", i);
566567
}
567568
assert!(fz.by_name("setup.py").is_ok());
568-
assert!(fz.by_name("dir/subdir/.hidden").is_err());
569-
let mut file = fz.by_name("dir/subdir/file").unwrap();
569+
assert!(fz
570+
.by_name(
571+
&Path::new("dir")
572+
.join("subdir")
573+
.join(".hidden")
574+
.to_string_lossy()
575+
)
576+
.is_err());
577+
let mut file = fz
578+
.by_name(
579+
&Path::new("dir")
580+
.join("subdir")
581+
.join("file")
582+
.to_string_lossy(),
583+
)
584+
.unwrap();
570585
let mut buf = String::new();
571586
file.read_to_string(&mut buf).unwrap();
572587
assert_eq!(buf, "some file");
573588
}
574589

575-
#[cfg(unix)]
576590
#[test]
577591
#[ignore = "issues in CI, maybe due to the user ID"]
578592
fn sets_permissions() {

0 commit comments

Comments
 (0)