fix macro by denying trailing slashes. also other stuff
This commit is contained in:
@@ -2,6 +2,7 @@ pub struct TestConfig {
|
||||
errno_mode: ErrnoMode,
|
||||
no_dangling_symlinks: bool,
|
||||
no_fd_allocate: bool,
|
||||
no_rename_dir_to_empty_dir: bool,
|
||||
}
|
||||
|
||||
enum ErrnoMode {
|
||||
@@ -21,10 +22,12 @@ impl TestConfig {
|
||||
};
|
||||
let no_dangling_symlinks = std::env::var("NO_DANGLING_SYMLINKS").is_ok();
|
||||
let no_fd_allocate = std::env::var("NO_FD_ALLOCATE").is_ok();
|
||||
let no_rename_dir_to_empty_dir = std::env::var("NO_RENAME_DIR_TO_EMPTY_DIR").is_ok();
|
||||
TestConfig {
|
||||
errno_mode,
|
||||
no_dangling_symlinks,
|
||||
no_fd_allocate,
|
||||
no_rename_dir_to_empty_dir,
|
||||
}
|
||||
}
|
||||
pub fn errno_expect_unix(&self) -> bool {
|
||||
@@ -45,4 +48,7 @@ impl TestConfig {
|
||||
pub fn support_fd_allocate(&self) -> bool {
|
||||
!self.no_fd_allocate
|
||||
}
|
||||
pub fn support_rename_dir_to_empty_dir(&self) -> bool {
|
||||
!self.no_rename_dir_to_empty_dir
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user