summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorSebastian Thiel <sthiel@thoughtworks.com>2019-06-02 16:00:35 +0530
committerSebastian Thiel <sthiel@thoughtworks.com>2019-06-02 16:00:35 +0530
commitdec4afc358aa30521d564068b219eca129245782 (patch)
treee4ab122ff07671b9e31fe002105c09d159bc9217 /tests
parent5a7ee1bf881518b6cd33a1880fabd12aa53553bf (diff)
Add test showing sizes don't work, and graph traversal neither :D
Diffstat (limited to 'tests')
-rw-r--r--tests/fixtures/sample-01/z123.b1
-rw-r--r--tests/interactive.rs10
-rw-r--r--tests/snapshots/success-bytes-binary1
-rw-r--r--tests/snapshots/success-bytes-only3
-rw-r--r--tests/snapshots/success-no-arguments1
-rw-r--r--tests/snapshots/success-no-arguments-multiple-input-paths-statistics2
-rw-r--r--tests/snapshots/success-no-arguments-no-sort1
7 files changed, 13 insertions, 6 deletions
diff --git a/tests/fixtures/sample-01/z123.b b/tests/fixtures/sample-01/z123.b
new file mode 100644
index 0000000..11321e2
--- /dev/null
+++ b/tests/fixtures/sample-01/z123.b
@@ -0,0 +1 @@
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \ No newline at end of file
diff --git a/tests/interactive.rs b/tests/interactive.rs
index 4e6a44a..a181362 100644
--- a/tests/interactive.rs
+++ b/tests/interactive.rs
@@ -18,8 +18,8 @@ mod app {
let expected_tree = sample_01_tree();
assert_eq!(
- debug(app.tree.raw_edges()),
- debug(expected_tree.raw_edges()),
+ debug(app.tree),
+ debug(expected_tree),
"filesystem graph is stable and matches the directory structure"
);
Ok(())
@@ -58,9 +58,10 @@ mod app {
}
n
};
- let r = add_node("", 0, None);
+ let root_size = 1259325;
+ let r = add_node("", root_size, None);
{
- let s = add_node("sample-01", 0, Some(r));
+ let s = add_node("sample-01", root_size, Some(r));
{
add_node(".hidden.666", 666, Some(s));
add_node("a", 256, Some(s));
@@ -80,6 +81,7 @@ mod app {
add_node("dir-sub-a.256kb", 256_000, Some(sub));
}
}
+ add_node("z123.b", 123, Some(s));
}
}
t
diff --git a/tests/snapshots/success-bytes-binary b/tests/snapshots/success-bytes-binary
index acc26fc..7a43a1a 100644
--- a/tests/snapshots/success-bytes-binary
+++ b/tests/snapshots/success-bytes-binary
@@ -1,4 +1,5 @@
0.00 B b.empty
+ 123.00 B z123.b
256.00 B a
256.00 B c.lnk
666.00 B .hidden.666
diff --git a/tests/snapshots/success-bytes-only b/tests/snapshots/success-bytes-only
index b83f090..bf6466a 100644
--- a/tests/snapshots/success-bytes-only
+++ b/tests/snapshots/success-bytes-only
@@ -1,6 +1,7 @@
0 b b.empty
+ 123 b z123.b
256 b a
256 b c.lnk
666 b .hidden.666
1258024 b dir
- 1259202 b total \ No newline at end of file
+ 1259325 b total \ No newline at end of file
diff --git a/tests/snapshots/success-no-arguments b/tests/snapshots/success-no-arguments
index e85cf4b..8348016 100644
--- a/tests/snapshots/success-no-arguments
+++ b/tests/snapshots/success-no-arguments
@@ -1,4 +1,5 @@
0.00 B b.empty
+ 123.00 B z123.b
256.00 B a
256.00 B c.lnk
666.00 B .hidden.666
diff --git a/tests/snapshots/success-no-arguments-multiple-input-paths-statistics b/tests/snapshots/success-no-arguments-multiple-input-paths-statistics
index 5925329..36024d6 100644
--- a/tests/snapshots/success-no-arguments-multiple-input-paths-statistics
+++ b/tests/snapshots/success-no-arguments-multiple-input-paths-statistics
@@ -4,4 +4,4 @@
1.26 MB .
1.26 MB .
5.29 MB total
-Statistics { files_traversed: 44, smallest_file_in_bytes: 0, largest_file_in_bytes: 1000000 } \ No newline at end of file
+Statistics { entries_traversed: 46, smallest_file_in_bytes: 0, largest_file_in_bytes: 1000000 } \ No newline at end of file
diff --git a/tests/snapshots/success-no-arguments-no-sort b/tests/snapshots/success-no-arguments-no-sort
index 42f24a4..126d918 100644
--- a/tests/snapshots/success-no-arguments-no-sort
+++ b/tests/snapshots/success-no-arguments-no-sort
@@ -3,4 +3,5 @@
0.00 B b.empty
256.00 B c.lnk
1.26 MB dir
+ 123.00 B z123.b
1.26 MB total \ No newline at end of file