mirror of
https://github.com/sagiegurari/duckscript
synced 2024-10-14 11:53:05 +00:00
fix tests for windows
This commit is contained in:
parent
cfb3a0c7bc
commit
000070e457
|
@ -1,7 +1,5 @@
|
|||
use super::*;
|
||||
use crate::test;
|
||||
use crate::test::CommandValidation;
|
||||
use fsio::file::ensure_exists;
|
||||
|
||||
#[test]
|
||||
fn common_functions() {
|
||||
|
@ -18,9 +16,13 @@ fn run_no_path_provided() {
|
|||
test::run_script_and_error(vec![create("")], "out = chmod 755", "out");
|
||||
}
|
||||
|
||||
#[cfg(any(target_os = "redox", unix, target_os = "vxworks"))]
|
||||
#[test]
|
||||
fn run_single_file_unix() {
|
||||
cfg_if::cfg_if! {
|
||||
if #[cfg(any(target_os = "redox", unix, target_os = "vxworks"))] {
|
||||
use crate::test::CommandValidation;
|
||||
use fsio::file::ensure_exists;
|
||||
|
||||
#[test]
|
||||
fn run_single_file_unix() {
|
||||
let result = ensure_exists("./target/_duckscript/chmod/file.txt");
|
||||
assert!(result.is_ok());
|
||||
|
||||
|
@ -29,4 +31,6 @@ fn run_single_file_unix() {
|
|||
"out = chmod 777 ./target/_duckscript/chmod/file.txt",
|
||||
CommandValidation::Match("out".to_string(), "511".to_string()),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue