summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorSebastian Thiel <sthiel@thoughtworks.com>2019-06-02 14:50:59 +0530
committerSebastian Thiel <sthiel@thoughtworks.com>2019-06-02 14:50:59 +0530
commit0774eccb72abfd800880cbc8490cb9899f1ab140 (patch)
treebeacb71074c16db4dfdaa08bd63a9afcc9d8b285 /tests
parent68569c69f5fdeedddd45635e8eb6d0c255de53f4 (diff)
first failing attempt to build a graph on demand
Next is to get the parent index right
Diffstat (limited to 'tests')
-rw-r--r--tests/interactive.rs11
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/interactive.rs b/tests/interactive.rs
index 1ea19d4..b23f9c6 100644
--- a/tests/interactive.rs
+++ b/tests/interactive.rs
@@ -1,5 +1,5 @@
mod app {
- use dua::interactive::{App, ItemData, Tree};
+ use dua::interactive::{EntryData, TerminalApp, Tree};
use dua::{ByteFormat, Color, Sorting, WalkOptions};
use failure::Error;
use pretty_assertions::assert_eq;
@@ -13,7 +13,7 @@ mod app {
#[test]
fn journey_with_single_path() -> Result<(), Error> {
- let (terminal, app) = initialized_app_and_terminal("sample-01")?;
+ let (_, app) = initialized_app_and_terminal("sample-01")?;
let expected_tree = sample_01_tree();
assert_eq!(
@@ -26,12 +26,12 @@ mod app {
fn initialized_app_and_terminal(
fixture_path: &str,
- ) -> Result<(Terminal<TestBackend>, App), Error> {
+ ) -> Result<(Terminal<TestBackend>, TerminalApp), Error> {
let mut terminal = Terminal::new(TestBackend::new(40, 20))?;
let input = Path::new(env!("CARGO_MANIFEST_DIR"))
.join("tests/fixtures")
.join(fixture_path);
- let app = App::initialize(
+ let app = TerminalApp::initialize(
&mut terminal,
WalkOptions {
threads: 1,
@@ -46,9 +46,10 @@ mod app {
fn sample_01_tree() -> Tree {
let mut expected_tree = Tree::new();
- expected_tree.add_node(ItemData {
+ expected_tree.add_node(EntryData {
name: OsString::from("foo"),
size: 231,
+ metadata_io_error: false,
});
expected_tree
}