diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json
index 68dbd114..3018ca47 100644
--- a/.config/dotnet-tools.json
+++ b/.config/dotnet-tools.json
@@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"dotnet-reportgenerator-globaltool": {
- "version": "4.7.1",
+ "version": "4.8.1",
"commands": [
"reportgenerator"
]
diff --git a/src/CommandLineUtils/releasenotes.props b/src/CommandLineUtils/releasenotes.props
index 322fb477..93285be0 100644
--- a/src/CommandLineUtils/releasenotes.props
+++ b/src/CommandLineUtils/releasenotes.props
@@ -149,7 +149,7 @@ Bugs fixed:
$(PackageReleaseNotes)
-See more details here: https://github.com/natemcmaster/CommandLineUtils/blob/master/CHANGELOG.md#v$(VersionPrefix.Replace('.',''))
+See more details here: https://github.com/natemcmaster/CommandLineUtils/blob/main/CHANGELOG.md#v$(VersionPrefix.Replace('.',''))
diff --git a/src/Hosting.CommandLine/releasenotes.props b/src/Hosting.CommandLine/releasenotes.props
index c39678a0..577b1a6e 100644
--- a/src/Hosting.CommandLine/releasenotes.props
+++ b/src/Hosting.CommandLine/releasenotes.props
@@ -34,7 +34,7 @@ $(PackageReleaseNotes)
$(PackageReleaseNotes)
-See more details here: https://github.com/natemcmaster/CommandLineUtils/blob/master/CHANGELOG.md#v$(VersionPrefix.Replace('.',''))
+See more details here: https://github.com/natemcmaster/CommandLineUtils/blob/main/CHANGELOG.md#v$(VersionPrefix.Replace('.',''))
diff --git a/test/CommandLineUtils.Tests/SubcommandAttributeTests.cs b/test/CommandLineUtils.Tests/SubcommandAttributeTests.cs
index 47942c41..667f4164 100755
--- a/test/CommandLineUtils.Tests/SubcommandAttributeTests.cs
+++ b/test/CommandLineUtils.Tests/SubcommandAttributeTests.cs
@@ -48,9 +48,9 @@ public void AddsSubcommands()
rm => { Assert.Equal("rm", rm.Name); });
}
- [Command(Name = "master")]
+ [Command(Name = "top")]
[Subcommand(typeof(Level1Command))]
- private class MasterApp : CommandBase
+ private class TopApp : CommandBase
{
[Option(Inherited = true)]
public bool Verbose { get; set; }
@@ -66,7 +66,7 @@ private class Level1Command : CommandBase
protected override int OnExecute(CommandLineApplication app) => 101;
- public MasterApp? Parent { get; }
+ public TopApp? Parent { get; }
}
private class Level2Command : CommandBase
@@ -93,25 +93,25 @@ abstract class CommandBase
[Fact]
public void ItInvokesExecuteOnSubcommand_Bottom()
{
- var rc = CommandLineApplication.Execute(new TestConsole(_output), "level1", "level2", "--value",
+ var rc = CommandLineApplication.Execute(new TestConsole(_output), "level1", "level2", "--value",
"6");
Assert.Equal(6, rc);
- rc = CommandLineApplication.Execute(new TestConsole(_output), "level1", "level2");
+ rc = CommandLineApplication.Execute(new TestConsole(_output), "level1", "level2");
Assert.Equal(102, rc);
}
[Fact]
public void ItInvokesExecuteOnSubcommand_Middle()
{
- var rc = CommandLineApplication.Execute(new TestConsole(_output), "level1");
+ var rc = CommandLineApplication.Execute(new TestConsole(_output), "level1");
Assert.Equal(101, rc);
}
[Fact]
public void ItInvokesExecuteOnSubcommand_Top()
{
- var rc = CommandLineApplication.Execute(new TestConsole(_output));
+ var rc = CommandLineApplication.Execute(new TestConsole(_output));
Assert.Equal(100, rc);
}
@@ -124,9 +124,9 @@ public void HandlesHelp_Bottom()
{
Out = output,
};
- var rc = CommandLineApplication.Execute(console, "level1", "level2", "--help");
+ var rc = CommandLineApplication.Execute(console, "level1", "level2", "--help");
Assert.Equal(0, rc);
- Assert.Contains("Usage: master level1 level2 [options]", sb.ToString());
+ Assert.Contains("Usage: top level1 level2 [options]", sb.ToString());
}
[Fact]
@@ -138,9 +138,9 @@ public void HandlesHelp_Middle()
{
Out = output,
};
- var rc = CommandLineApplication.Execute(console, "level1", "--help");
+ var rc = CommandLineApplication.Execute(console, "level1", "--help");
Assert.Equal(0, rc);
- Assert.Contains("Usage: master level1 [command] [options]", sb.ToString());
+ Assert.Contains("Usage: top level1 [command] [options]", sb.ToString());
}
[Fact]
@@ -152,15 +152,15 @@ public void HandlesHelp_Top()
{
Out = output,
};
- var rc = CommandLineApplication.Execute(console, "--help");
+ var rc = CommandLineApplication.Execute(console, "--help");
Assert.Equal(0, rc);
- Assert.Contains("Usage: master [command] [options]", sb.ToString());
+ Assert.Contains("Usage: top [command] [options]", sb.ToString());
}
[Fact]
public void ItCreatesNestedSubCommands()
{
- var app = new CommandLineApplication();
+ var app = new CommandLineApplication();
app.Conventions.UseSubcommandAttributes().UseCommandAttribute().UseCommandNameFromModelType();
var lvl1 = Assert.Single(app.Commands);
Assert.Equal("level1", lvl1.Name);
@@ -171,7 +171,7 @@ public void ItCreatesNestedSubCommands()
[Fact]
public void ItBindsOptionsOnParentItems()
{
- var app = CommandLineParser.ParseArgs("level1", "--mid", "level2", "--verbose", "--value", "6");
+ var app = CommandLineParser.ParseArgs("level1", "--mid", "level2", "--verbose", "--value", "6");
Assert.IsType(app.Subcommand);
var sub = Assert.IsType(app.Subcommand?.Subcommand);
Assert.NotNull(sub.Parent);