Skip to content

Commit df0a511

Browse files
committed
cleanup: fixup more references to 'master'
1 parent 7d705cc commit df0a511

File tree

4 files changed

+18
-18
lines changed

4 files changed

+18
-18
lines changed

.config/dotnet-tools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"isRoot": true,
44
"tools": {
55
"dotnet-reportgenerator-globaltool": {
6-
"version": "4.7.1",
6+
"version": "4.8.1",
77
"commands": [
88
"reportgenerator"
99
]

src/CommandLineUtils/releasenotes.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ Bugs fixed:
149149
</PackageReleaseNotes>
150150
<PackageReleaseNotes>$(PackageReleaseNotes)
151151

152-
See more details here: https://github.com/natemcmaster/CommandLineUtils/blob/master/CHANGELOG.md#v$(VersionPrefix.Replace('.',''))
152+
See more details here: https://github.com/natemcmaster/CommandLineUtils/blob/main/CHANGELOG.md#v$(VersionPrefix.Replace('.',''))
153153
</PackageReleaseNotes>
154154
</PropertyGroup>
155155
</Project>

src/Hosting.CommandLine/releasenotes.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ $(PackageReleaseNotes)
3434
</PackageReleaseNotes>
3535
<PackageReleaseNotes>$(PackageReleaseNotes)
3636

37-
See more details here: https://github.com/natemcmaster/CommandLineUtils/blob/master/CHANGELOG.md#v$(VersionPrefix.Replace('.',''))
37+
See more details here: https://github.com/natemcmaster/CommandLineUtils/blob/main/CHANGELOG.md#v$(VersionPrefix.Replace('.',''))
3838
</PackageReleaseNotes>
3939
</PropertyGroup>
4040
</Project>

test/CommandLineUtils.Tests/SubcommandAttributeTests.cs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ public void AddsSubcommands()
4848
rm => { Assert.Equal("rm", rm.Name); });
4949
}
5050

51-
[Command(Name = "master")]
51+
[Command(Name = "top")]
5252
[Subcommand(typeof(Level1Command))]
53-
private class MasterApp : CommandBase
53+
private class TopApp : CommandBase
5454
{
5555
[Option(Inherited = true)]
5656
public bool Verbose { get; set; }
@@ -66,7 +66,7 @@ private class Level1Command : CommandBase
6666

6767
protected override int OnExecute(CommandLineApplication app) => 101;
6868

69-
public MasterApp? Parent { get; }
69+
public TopApp? Parent { get; }
7070
}
7171

7272
private class Level2Command : CommandBase
@@ -93,25 +93,25 @@ abstract class CommandBase
9393
[Fact]
9494
public void ItInvokesExecuteOnSubcommand_Bottom()
9595
{
96-
var rc = CommandLineApplication.Execute<MasterApp>(new TestConsole(_output), "level1", "level2", "--value",
96+
var rc = CommandLineApplication.Execute<TopApp>(new TestConsole(_output), "level1", "level2", "--value",
9797
"6");
9898
Assert.Equal(6, rc);
9999

100-
rc = CommandLineApplication.Execute<MasterApp>(new TestConsole(_output), "level1", "level2");
100+
rc = CommandLineApplication.Execute<TopApp>(new TestConsole(_output), "level1", "level2");
101101
Assert.Equal(102, rc);
102102
}
103103

104104
[Fact]
105105
public void ItInvokesExecuteOnSubcommand_Middle()
106106
{
107-
var rc = CommandLineApplication.Execute<MasterApp>(new TestConsole(_output), "level1");
107+
var rc = CommandLineApplication.Execute<TopApp>(new TestConsole(_output), "level1");
108108
Assert.Equal(101, rc);
109109
}
110110

111111
[Fact]
112112
public void ItInvokesExecuteOnSubcommand_Top()
113113
{
114-
var rc = CommandLineApplication.Execute<MasterApp>(new TestConsole(_output));
114+
var rc = CommandLineApplication.Execute<TopApp>(new TestConsole(_output));
115115
Assert.Equal(100, rc);
116116
}
117117

@@ -124,9 +124,9 @@ public void HandlesHelp_Bottom()
124124
{
125125
Out = output,
126126
};
127-
var rc = CommandLineApplication.Execute<MasterApp>(console, "level1", "level2", "--help");
127+
var rc = CommandLineApplication.Execute<TopApp>(console, "level1", "level2", "--help");
128128
Assert.Equal(0, rc);
129-
Assert.Contains("Usage: master level1 level2 [options]", sb.ToString());
129+
Assert.Contains("Usage: top level1 level2 [options]", sb.ToString());
130130
}
131131

132132
[Fact]
@@ -138,9 +138,9 @@ public void HandlesHelp_Middle()
138138
{
139139
Out = output,
140140
};
141-
var rc = CommandLineApplication.Execute<MasterApp>(console, "level1", "--help");
141+
var rc = CommandLineApplication.Execute<TopApp>(console, "level1", "--help");
142142
Assert.Equal(0, rc);
143-
Assert.Contains("Usage: master level1 [command] [options]", sb.ToString());
143+
Assert.Contains("Usage: top level1 [command] [options]", sb.ToString());
144144
}
145145

146146
[Fact]
@@ -152,15 +152,15 @@ public void HandlesHelp_Top()
152152
{
153153
Out = output,
154154
};
155-
var rc = CommandLineApplication.Execute<MasterApp>(console, "--help");
155+
var rc = CommandLineApplication.Execute<TopApp>(console, "--help");
156156
Assert.Equal(0, rc);
157-
Assert.Contains("Usage: master [command] [options]", sb.ToString());
157+
Assert.Contains("Usage: top [command] [options]", sb.ToString());
158158
}
159159

160160
[Fact]
161161
public void ItCreatesNestedSubCommands()
162162
{
163-
var app = new CommandLineApplication<MasterApp>();
163+
var app = new CommandLineApplication<TopApp>();
164164
app.Conventions.UseSubcommandAttributes().UseCommandAttribute().UseCommandNameFromModelType();
165165
var lvl1 = Assert.Single(app.Commands);
166166
Assert.Equal("level1", lvl1.Name);
@@ -171,7 +171,7 @@ public void ItCreatesNestedSubCommands()
171171
[Fact]
172172
public void ItBindsOptionsOnParentItems()
173173
{
174-
var app = CommandLineParser.ParseArgs<MasterApp>("level1", "--mid", "level2", "--verbose", "--value", "6");
174+
var app = CommandLineParser.ParseArgs<TopApp>("level1", "--mid", "level2", "--verbose", "--value", "6");
175175
Assert.IsType<Level1Command>(app.Subcommand);
176176
var sub = Assert.IsType<Level2Command>(app.Subcommand?.Subcommand);
177177
Assert.NotNull(sub.Parent);

0 commit comments

Comments
 (0)