INNER CODE UNIT · Go
assertStorageExportMatchesPlain
dundee/gdu · report/export_storage_test.go:23
func assertStorageExportMatchesPlain(
t *testing.T, analyzer common.Analyzer, depth int, summarize bool,
) string {
t.Helper()
fin := testdir.CreateTestDir()
defer fin()
// The absolute path pins the exported root name: it is built from
// BasePath, which is not on the fs.Item interface and used to be dropped
// for stored roots.
path, err := filepath.Abs("test_dir")
assert.Nil(t, err)
var plain, plainReport bytes.Buffer
plainUI := CreateExportUI(&plain, &plainReport, false, false, false, 0, depth, summarize, nil)
plainUI.SetIgnoreDirPaths([]string{"/xxx"})
assert.Nil(t, plainUI.AnalyzePath(path, nil))