From 0774eccb72abfd800880cbc8490cb9899f1ab140 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Sun, 2 Jun 2019 14:50:59 +0530 Subject: first failing attempt to build a graph on demand Next is to get the parent index right --- tests/interactive.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'tests') 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, App), Error> { + ) -> Result<(Terminal, 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 } -- cgit v1.2.3