forked from comtrya/comtrya
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbasic_usage.rs
More file actions
44 lines (40 loc) · 1018 Bytes
/
basic_usage.rs
File metadata and controls
44 lines (40 loc) · 1018 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
use tempdir::TempDir;
use utils::*;
#[path = "./utils.rs"]
mod utils;
#[test]
fn prints_help() {
let t = TempDir::new("comtrya").expect("could not create tempdir");
let path = t.into_path();
dir(
"directory",
vec![dir(
"copy",
vec![
dir(
"files",
vec![dir(
"mydir",
vec![
f("file-a", "some content a"),
f("file-b", "some other thing"),
],
)],
),
f(
"main.yaml",
r#"
actions:
- action: directory.copy
from: mydir
to: mydircopy
"#,
),
],
)],
)
.create_in(&path.clone())
.expect("should have create test directories");
let assert = cd(path).run("comtrya directory/copy/main.yaml --dry-run --no-color");
assert.success();
}