-
-
Notifications
You must be signed in to change notification settings - Fork 66
/
Copy pathflat.rs
63 lines (56 loc) · 1.23 KB
/
flat.rs
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
use indoc::indoc;
mod utils;
#[test]
fn flat() {
assert_eq!(
utils::run_cmd(&["--layout", "flat", "tests/data"]),
indoc!(
"143 B the_yellow_king/cassildas_song.md
143 B the_yellow_king
100 B nylarlathotep.txt
161 B nemesis.txt
83 B necronomicon.txt
446 B lipsum/lipsum.txt
446 B lipsum
308 B dream_cycle/polaris.txt
308 B dream_cycle
1241 B data
3 directories, 6 files"
)
)
}
#[test]
fn flat_human() {
assert_eq!(
utils::run_cmd(&["--layout", "flat", "--human", "tests/data"]),
indoc!(
"143 B the_yellow_king/cassildas_song.md
143 B the_yellow_king
100 B nylarlathotep.txt
161 B nemesis.txt
83 B necronomicon.txt
446 B lipsum/lipsum.txt
446 B lipsum
308 B dream_cycle/polaris.txt
308 B dream_cycle
1.2 KiB data
3 directories, 6 files"
)
)
}
#[test]
fn flat_with_level() {
assert_eq!(
utils::run_cmd(&["--layout", "flat", "--level", "1", "tests/data"]),
indoc!(
"143 B the_yellow_king
100 B nylarlathotep.txt
161 B nemesis.txt
83 B necronomicon.txt
446 B lipsum
308 B dream_cycle
1241 B data
3 directories, 6 files"
)
)
}