diff options
author | Daniel Milde <daniel@milde.cz> | 2021-03-24 14:30:32 +0100 |
---|---|---|
committer | Daniel Milde <daniel@milde.cz> | 2021-03-24 14:30:32 +0100 |
commit | 956141ac82293ed65627f6b5c5c4a14544d317ba (patch) | |
tree | 108fa7665c80eccce31ac269481aac8805e5c3c3 /stdout | |
parent | f0d73dbf49fecdc11095987d18d0eef38d001608 (diff) |
getItemStats as method
Diffstat (limited to 'stdout')
-rw-r--r-- | stdout/stdout_test.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/stdout/stdout_test.go b/stdout/stdout_test.go index c4808ad..48f9c08 100644 --- a/stdout/stdout_test.go +++ b/stdout/stdout_test.go @@ -26,6 +26,21 @@ func TestAnalyzePath(t *testing.T) { assert.Contains(t, output.String(), "nested") } +func TestAnalyzeSubdir(t *testing.T) { + fin := testdir.CreateTestDir() + defer fin() + + buff := make([]byte, 10) + output := bytes.NewBuffer(buff) + + ui := CreateStdoutUI(output, false, false, false) + ui.SetIgnoreDirPaths([]string{"/xxx"}) + ui.AnalyzePath("test_dir/nested", nil) + ui.StartUILoop() + + assert.Contains(t, output.String(), "file2") +} + func TestAnalyzePathWithErr(t *testing.T) { buff := make([]byte, 10) output := bytes.NewBuffer(buff) |