mirror of
https://github.com/sagiegurari/duckscript
synced 2024-10-06 08:02:06 +00:00
formatting
This commit is contained in:
parent
57e0f49515
commit
81288b9288
|
@ -34,10 +34,13 @@ fn run_file_to_file() {
|
|||
assert!(result.is_ok());
|
||||
assert!(path.exists());
|
||||
|
||||
test::run_script_and_validate(vec![create("")], r#"
|
||||
test::run_script_and_validate(
|
||||
vec![create("")],
|
||||
r#"
|
||||
out = mv ./target/_duckscript/mv/run_file_to_file/1/file1.txt ./target/_duckscript/mv/run_file_to_file/2/file2.txt
|
||||
"#,
|
||||
CommandValidation::Match("out".to_string(), "true".to_string()),);
|
||||
CommandValidation::Match("out".to_string(), "true".to_string()),
|
||||
);
|
||||
|
||||
assert!(!path.exists());
|
||||
path = Path::new("./target/_duckscript/mv/run_file_to_file/2/file2.txt");
|
||||
|
@ -51,10 +54,13 @@ fn run_file_to_directory() {
|
|||
assert!(result.is_ok());
|
||||
assert!(path.exists());
|
||||
|
||||
test::run_script_and_validate(vec![create("")], r#"
|
||||
test::run_script_and_validate(
|
||||
vec![create("")],
|
||||
r#"
|
||||
out = mv ./target/_duckscript/mv/run_file_to_directory/1/file1.txt ./target/_duckscript/mv/run_file_to_directory/2
|
||||
"#,
|
||||
CommandValidation::Match("out".to_string(), "true".to_string()),);
|
||||
CommandValidation::Match("out".to_string(), "true".to_string()),
|
||||
);
|
||||
|
||||
assert!(!path.exists());
|
||||
path = Path::new("./target/_duckscript/mv/run_file_to_directory/2/file1.txt");
|
||||
|
@ -68,10 +74,13 @@ fn run_directory_to_directory() {
|
|||
assert!(result.is_ok());
|
||||
assert!(path.exists());
|
||||
|
||||
test::run_script_and_validate(vec![create("")], r#"
|
||||
test::run_script_and_validate(
|
||||
vec![create("")],
|
||||
r#"
|
||||
out = mv ./target/_duckscript/mv/run_directory_to_directory/1 ./target/_duckscript/mv/run_directory_to_directory/2
|
||||
"#,
|
||||
CommandValidation::Match("out".to_string(), "true".to_string()),);
|
||||
CommandValidation::Match("out".to_string(), "true".to_string()),
|
||||
);
|
||||
|
||||
assert!(!path.exists());
|
||||
path = Path::new("./target/_duckscript/mv/run_directory_to_directory/2/1/1/file1.txt");
|
||||
|
|
|
@ -61,7 +61,9 @@ fn parse_options(arguments: &Vec<String>) -> Result<Options, String> {
|
|||
"get" => options.method = Method::Get,
|
||||
"post" => options.method = Method::Post,
|
||||
_ => {
|
||||
return Err(format!("Unsupported HTTP method: {}", argument).to_string());
|
||||
return Err(
|
||||
format!("Unsupported HTTP method: {}", argument).to_string()
|
||||
);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue