Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests: Remove FSEntry.this dependency on TestDub #2878

Merged
merged 1 commit into from
Feb 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 8 additions & 12 deletions source/dub/test/base.d
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,14 @@ public class TestDub : Dub
PackageSupplier[] extras = null,
SkipPackageSuppliers skip = SkipPackageSuppliers.none)
{
/// Create the fs & its base structure
this.fs = new FSEntry();
this.fs.mkdir(Paths.temp);
this.fs.mkdir(Paths.systemSettings);
this.fs.mkdir(Paths.userSettings);
this.fs.mkdir(Paths.userPackages);
this.fs.mkdir(Paths.cache);
this.fs.mkdir(ProjectPath);
if (dg !is null) dg(this.fs);
super(root, extras, skip);
}
Expand Down Expand Up @@ -562,20 +569,9 @@ public class FSEntry
}

/// Create the root of the filesystem, only usable from this module
private this (bool initialize = true)
private this ()
{
this.type = Type.Directory;

if (initialize) {
/// Create the base structure
this.mkdir(TestDub.Paths.temp);
this.mkdir(TestDub.Paths.systemSettings);
this.mkdir(TestDub.Paths.userSettings);
this.mkdir(TestDub.Paths.userPackages);
this.mkdir(TestDub.Paths.cache);

this.mkdir(TestDub.ProjectPath);
}
}

/// Get a direct children node, returns `null` if it can't be found
Expand Down
Loading