Trailing newlines + standardize tabs -> spaces

This commit is contained in:
Piotr Puszkiewicz 2017-03-02 20:35:20 -08:00
parent d9a06ba95c
commit e617376bc7
181 changed files with 285 additions and 285 deletions

View file

@ -268,4 +268,4 @@ namespace Microsoft.DotNet.Tests.ArgumentForwarding
return ParseReflectorOutput(stdOut);
}
}
}
}

View file

@ -24,4 +24,4 @@ namespace Microsoft.DotNet.Tests.ArgumentForwarding
}
}
}
}
}

View file

@ -46,4 +46,4 @@ namespace Microsoft.DotNet.Cli.Utils.Tests
stopWatch.ElapsedMilliseconds.Should().BeLessThan(1000);
}
}
}
}

View file

@ -113,7 +113,7 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
public void ItHasErrorWhenMigratingAProjectJsonWithoutAFrameworks()
{
var testInstance = TestAssets.Get(
"NonRestoredTestProjects",
"NonRestoredTestProjects",
"TestLibraryWithProjectFileWithoutFrameworks")
.CreateInstance()
.WithSourceFiles();
@ -151,4 +151,4 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
}
}
}
}
}

View file

@ -260,4 +260,4 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
item2.Metadata.First().Value.Should().Be("value");
}
}
}
}

View file

@ -35,4 +35,4 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
mockProj.Targets.Should().HaveCount(c => c == 1);
}
}
}
}

View file

@ -127,4 +127,4 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
generateAssemblyAttributes.First().Value.Should().Be("false");
}
}
}
}

View file

@ -26,7 +26,7 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
{
var mockProj = RunPropertiesRuleOnPj(@"
{
""userSecretsId"": ""XYZ""
""userSecretsId"": ""XYZ""
}");
mockProj.Properties.Count(p => p.Name == "UserSecretsId").Should().Be(1);
@ -38,7 +38,7 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
{
var mockProj = RunPropertiesRuleOnPj(@"
{
""userSecretsId"": """"
""userSecretsId"": """"
}");
mockProj.Properties.Count(p => p.Name == "UserSecretsId").Should().Be(0);
@ -53,4 +53,4 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
}, project, testDirectory);
}
}
}
}

View file

@ -21,10 +21,10 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
{
""packOptions"": {
""summary"": ""Some not important summary""
}
}
}");
EmitsOnlyAlwaysEmittedPackOptionsProperties(mockProj);
EmitsOnlyAlwaysEmittedPackOptionsProperties(mockProj);
}
[Fact]
@ -34,7 +34,7 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
{
""packOptions"": {
""owner"": ""Some not important owner""
}
}
}");
EmitsOnlyAlwaysEmittedPackOptionsProperties(mockProj);
@ -47,7 +47,7 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
{
""packOptions"": {
""tags"": []
}
}
}");
mockProj.Properties.Count(p => p.Name == "PackageTags").Should().Be(0);
@ -60,7 +60,7 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
{
""packOptions"": {
""tags"": [""hyperscale"", ""cats""]
}
}
}");
mockProj.Properties.Count(p => p.Name == "PackageTags").Should().Be(1);
@ -74,7 +74,7 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
{
""packOptions"": {
""releaseNotes"": ""Some release notes value.""
}
}
}");
mockProj.Properties.Count(p => p.Name == "PackageReleaseNotes").Should().Be(1);
@ -89,7 +89,7 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
{
""packOptions"": {
""iconUrl"": ""http://www.mylibrary.gov/favicon.ico""
}
}
}");
mockProj.Properties.Count(p => p.Name == "PackageIconUrl").Should().Be(1);
@ -104,7 +104,7 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
{
""packOptions"": {
""projectUrl"": ""http://www.url.to.library.com""
}
}
}");
mockProj.Properties.Count(p => p.Name == "PackageProjectUrl").Should().Be(1);
@ -119,7 +119,7 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
{
""packOptions"": {
""licenseUrl"": ""http://www.url.to.library.com/licence""
}
}
}");
mockProj.Properties.Count(p => p.Name == "PackageLicenseUrl").Should().Be(1);
@ -134,7 +134,7 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
{
""packOptions"": {
""requireLicenseAcceptance"": ""true""
}
}
}");
mockProj.Properties.Count(p => p.Name == "PackageRequireLicenseAcceptance").Should().Be(1);
@ -148,7 +148,7 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
{
""packOptions"": {
""requireLicenseAcceptance"": ""false""
}
}
}");
mockProj.Properties.Count(p => p.Name == "PackageRequireLicenseAcceptance").Should().Be(1);
@ -164,7 +164,7 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
""repository"": {
""type"": ""git""
}
}
}
}");
mockProj.Properties.Count(p => p.Name == "RepositoryType").Should().Be(1);
@ -277,8 +277,8 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
}");
var expectedPackagePath = string.Join(
";",
new [] {
";",
new [] {
Path.Combine("different", "path"),
Path.Combine("other", "path")
});
@ -307,6 +307,6 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
{
project.Properties.Count().Should().Be(1);
project.Properties.All(p => p.Name == "PackageRequireLicenseAcceptance").Should().BeTrue();
}
}
}
}
}

View file

@ -17,7 +17,7 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
[Fact]
public void ItMigratesBasicPackageReference()
{
var mockProj = RunPackageDependenciesRuleOnPj(@"
var mockProj = RunPackageDependenciesRuleOnPj(@"
{
""dependencies"": {
""APackage"" : ""1.0.0-preview"",
@ -31,7 +31,7 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
[Fact]
public void ItMigratesTypeBuildToPrivateAssets()
{
var mockProj = RunPackageDependenciesRuleOnPj(@"
var mockProj = RunPackageDependenciesRuleOnPj(@"
{
""dependencies"": {
""APackage"" : {
@ -52,7 +52,7 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
[Fact]
public void ItMigratesSuppressParentArrayToPrivateAssets()
{
var mockProj = RunPackageDependenciesRuleOnPj(@"
var mockProj = RunPackageDependenciesRuleOnPj(@"
{
""dependencies"": {
""APackage"" : {
@ -71,7 +71,7 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
[Fact]
public void ItMigratesSuppressParentStringToPrivateAssets()
{
var mockProj = RunPackageDependenciesRuleOnPj(@"
var mockProj = RunPackageDependenciesRuleOnPj(@"
{
""dependencies"": {
""APackage"" : {
@ -90,7 +90,7 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
[Fact]
public void ItMigratesIncludeExcludeArraysToIncludeAssets()
{
var mockProj = RunPackageDependenciesRuleOnPj(@"
var mockProj = RunPackageDependenciesRuleOnPj(@"
{
""dependencies"": {
""APackage"" : {
@ -110,7 +110,7 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
[Fact]
public void ItMigratesIncludeStringToIncludeAssets()
{
var mockProj = RunPackageDependenciesRuleOnPj(@"
var mockProj = RunPackageDependenciesRuleOnPj(@"
{
""dependencies"": {
""APackage"" : {
@ -130,7 +130,7 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
[Fact]
public void ItMigratesIncludeExcludeOverlappingStringsToIncludeAssets()
{
var mockProj = RunPackageDependenciesRuleOnPj(@"
var mockProj = RunPackageDependenciesRuleOnPj(@"
{
""dependencies"": {
""APackage"" : {
@ -151,7 +151,7 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
[Fact]
public void ItMigratesTools()
{
var mockProj = RunPackageDependenciesRuleOnPj(@"
var mockProj = RunPackageDependenciesRuleOnPj(@"
{
""tools"": {
""APackage"" : ""1.0.0-preview"",
@ -167,7 +167,7 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
{
var importPropertyName = "PackageTargetFallback";
var mockProj = RunPackageDependenciesRuleOnPj(@"
var mockProj = RunPackageDependenciesRuleOnPj(@"
{
""frameworks"": {
""netcoreapp1.0"" : {
@ -179,7 +179,7 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
""net451"" : {
""imports"": ""netstandard1.3""
}
}
}
}");
var imports = mockProj.Properties.Where(p => p.Name == importPropertyName);
@ -205,7 +205,7 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
{
var importPropertyName = "PackageTargetFallback";
var mockProj = RunPackageDependenciesRuleOnPj(@"
var mockProj = RunPackageDependenciesRuleOnPj(@"
{
""frameworks"": {
""netcoreapp1.0"" : {
@ -223,7 +223,7 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
[Fact]
public void ItAutoAddDesktopReferencesDuringMigrate()
{
var mockProj = RunPackageDependenciesRuleOnPj(@"
var mockProj = RunPackageDependenciesRuleOnPj(@"
{
""frameworks"": {
""net35"" : {},
@ -518,4 +518,4 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
netStandardImplicitPackageVersion.Condition.Should().BeEmpty();
}
}
}
}

View file

@ -281,4 +281,4 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
.Which.Value.Should().Be(targetVersion);
}
}
}
}

View file

@ -250,4 +250,4 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
}, s, testDirectory);
}
}
}
}

View file

@ -24,7 +24,7 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
mockProj.Properties.First(p => p.Name == "Authors").Value.Should().Be(
"Some author;Some other author");
}
private ProjectRootElement RunPropertiesRuleOnPj(string project, string testDirectory = null)
{
testDirectory = testDirectory ?? Temp.CreateDirectory().Path;
@ -34,4 +34,4 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
}, project, testDirectory);
}
}
}
}

View file

@ -26,7 +26,7 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
string targetVersion)
{
var mockProj = RunPackageDependenciesRuleOnPj("{ \"dependencies\": { \"" + sourceToolName + "\" : { \"version\": \"" + sourceVersion + "\", \"type\": \"build\" } } }");
var packageRef = mockProj.Items.First(i => i.Include == targetToolName && i.ItemType == "PackageReference");
packageRef.GetMetadataWithName("Version").Value.Should().Be(targetVersion);
@ -72,7 +72,7 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
{
const string anyVersion = "1.0.0-preview2-final";
var mockProj = RunPackageDependenciesRuleOnPj("{ \"tools\": { \"" + sourceToolName + "\": \"" + anyVersion + "\" } }");
EmitsToolReferences(mockProj, Tuple.Create(targetToolName, targetVersion));
}
@ -100,4 +100,4 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
EmitsToolReferences(mockProj, Tuple.Create("Microsoft.EntityFrameworkCore.Tools.DotNet", ConstantPackageVersions.AspNetToolsVersion));
}
}
}
}

View file

@ -61,4 +61,4 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
return Path.GetFileName(projectDirectory);
}
}
}
}

View file

@ -60,4 +60,4 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
}, s, testDirectory);
}
}
}
}

View file

@ -49,7 +49,7 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
if (projectContexts.Count() == 0)
{
projectContexts = new []
{
{
ProjectContext.Create(testPj, FrameworkConstants.CommonFrameworks.NetCoreApp10)
};
}
@ -80,4 +80,4 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
return project;
}
}
}
}

View file

@ -85,4 +85,4 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
mergedPropertyToAdd.Value.Should().Be("$(Variable2);value3;$(Variable3)");
}
}
}
}

View file

@ -28,4 +28,4 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
}
}
}
}
}

View file

@ -24,4 +24,4 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
File.WriteAllText(path, contents);
}
}
}
}

View file

@ -126,4 +126,4 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
return arguments;
}
}
}
}

View file

@ -1,4 +1,4 @@
using System.Runtime.CompilerServices;
[assembly: InternalsVisibleTo("Microsoft.Extensions.DependencyModel.Tests , PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
[assembly: InternalsVisibleTo("Microsoft.DotNet.Configurer.UnitTests , PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
[assembly: InternalsVisibleTo("Microsoft.DotNet.Configurer.UnitTests , PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]

View file

@ -79,4 +79,4 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
.FullName;
}
}
}
}

View file

@ -6,7 +6,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
/// <summary>
/// Implements a few file name utilities that are needed by the compiler.
/// In general the compiler is not supposed to understand the format of the paths.
/// In rare cases it needs to check if a string is a valid file name or change the extension
/// In rare cases it needs to check if a string is a valid file name or change the extension
/// (embedded resources, netmodules, output name).
/// The APIs are intentionally limited to cover just these rare cases. Do not add more APIs.
/// </summary>
@ -18,7 +18,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
internal const char VolumeSeparatorChar = ':';
/// <summary>
/// Returns true if the string represents an unqualified file name.
/// Returns true if the string represents an unqualified file name.
/// The name may contain any characters but directory and volume separators.
/// </summary>
/// <param name="path">Path.</param>
@ -121,8 +121,8 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
/// </summary>
/// <returns>
/// Equivalent of <see cref="System.IO.Path.ChangeExtension(string, string)"/>
///
/// If <paramref name="path"/> is null, returns null.
///
/// If <paramref name="path"/> is null, returns null.
/// If path does not end with an extension, the new extension is appended to the path.
/// If extension is null, equivalent to <see cref="RemoveExtension"/>.
/// </returns>
@ -180,4 +180,4 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
return (fileNameStart <= 0) ? path : path.Substring(fileNameStart);
}
}
}
}

View file

@ -40,4 +40,4 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
}
}
}
}
}

View file

@ -40,4 +40,4 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
/// </summary>
Absolute,
}
}
}

View file

@ -12,7 +12,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
// For example we need to be able to work with invalid paths or paths containing wildcards
internal static class PathUtilities
{
// We consider '/' a directory separator on Unix like systems.
// We consider '/' a directory separator on Unix like systems.
// On Windows both / and \ are equally accepted.
internal static readonly char DirectorySeparatorChar = IsUnixLikePlatform ? '/' : '\\';
internal static readonly char AltDirectorySeparatorChar = '/';
@ -73,7 +73,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
/// </summary>
/// <remarks>
/// Unlike <see cref="System.IO.Path.GetDirectoryName"/> it
/// doesn't check for invalid path characters,
/// doesn't check for invalid path characters,
/// doesn't strip any trailing directory separators (TODO: tomat),
/// doesn't recognize UNC structure \\computer-name\share\directory-name\file-name (TODO: tomat).
/// </remarks>
@ -295,9 +295,9 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
/// <param name="root">Absolute root path.</param>
/// <param name="relativePath">Relative path.</param>
/// <returns>
/// An absolute combined path, or null if <paramref name="relativePath"/> is
/// absolute (e.g. "C:\abc", "\\machine\share\abc"),
/// relative to the current root (e.g. "\abc"),
/// An absolute combined path, or null if <paramref name="relativePath"/> is
/// absolute (e.g. "C:\abc", "\\machine\share\abc"),
/// relative to the current root (e.g. "\abc"),
/// or relative to a drive directory (e.g. "C:abc\def").
/// </returns>
/// <seealso cref="CombinePossiblyRelativeAndRelativePaths"/>
@ -376,4 +376,4 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|| assemblyDisplayNameOrPath.IndexOf(AltDirectorySeparatorChar) != -1;
}
}
}
}

View file

@ -31,4 +31,4 @@ namespace Msbuild.Tests.Utilities
return ProjectRootElement.Open(CsProjPath, new ProjectCollection());
}
}
}
}

View file

@ -41,8 +41,8 @@ namespace Msbuild.Tests.Utilities
}
public static int NumberOfProjectReferencesWithIncludeAndConditionContaining(
this ProjectRootElement root,
string includePattern,
this ProjectRootElement root,
string includePattern,
string patternInCondition)
{
return root.ItemsWithIncludeAndConditionContaining(
@ -68,4 +68,4 @@ namespace Msbuild.Tests.Utilities
return root.ItemsWithIncludeContaining("ProjectReference", includePattern).Count();
}
}
}
}

View file

@ -77,4 +77,4 @@ namespace Microsoft.DotNet.Migration.Tests
.Pass();
}
}
}
}

View file

@ -77,45 +77,45 @@ namespace Microsoft.DotNet.Cli.Run.Tests
.WithWorkingDirectory(testProjectDirectory)
.ExecuteWithCapturedOutput("--framework netcoreapp1.0")
.Should().Pass()
.And.HaveStdOutContaining("Hello World!");
.And.HaveStdOutContaining("Hello World!");
}
[Fact]
public void ItRunsPortableAppsFromADifferentPathAfterBuilding()
[Fact]
public void ItRunsPortableAppsFromADifferentPathAfterBuilding()
{
var testInstance = TestAssets.Get("MSBuildTestApp")
.CreateInstance()
.WithSourceFiles()
.WithRestoreFiles();
new BuildCommand()
.WithWorkingDirectory(testInstance.Root)
.Execute()
.Should().Pass();
new RunCommand()
.WithWorkingDirectory(testInstance.Root)
.ExecuteWithCapturedOutput($"--no-build")
.Should().Pass()
.And.HaveStdOutContaining("Hello World!");
}
[Fact]
public void ItRunsPortableAppsFromADifferentPathWithoutBuilding()
{
var testAppName = "MSBuildTestApp";
new BuildCommand()
.WithWorkingDirectory(testInstance.Root)
.Execute()
.Should().Pass();
new RunCommand()
.WithWorkingDirectory(testInstance.Root)
.ExecuteWithCapturedOutput($"--no-build")
.Should().Pass()
.And.HaveStdOutContaining("Hello World!");
}
[Fact]
public void ItRunsPortableAppsFromADifferentPathWithoutBuilding()
{
var testAppName = "MSBuildTestApp";
var testInstance = TestAssets.Get(testAppName)
.CreateInstance()
.WithSourceFiles()
.WithRestoreFiles();
var projectFile = testInstance.Root.GetFile(testAppName + ".csproj");
var projectFile = testInstance.Root.GetFile(testAppName + ".csproj");
new RunCommand()
.WithWorkingDirectory(testInstance.Root.Parent)
.ExecuteWithCapturedOutput($"--project {projectFile.FullName}")
.Should().Pass()
.And.HaveStdOutContaining("Hello World!");
new RunCommand()
.WithWorkingDirectory(testInstance.Root.Parent)
.ExecuteWithCapturedOutput($"--project {projectFile.FullName}")
.Should().Pass()
.And.HaveStdOutContaining("Hello World!");
}
[Fact]
@ -146,4 +146,4 @@ namespace Microsoft.DotNet.Cli.Run.Tests
.And.HaveStdOutContaining("Hello World");
}
}
}
}

View file

@ -36,7 +36,7 @@ namespace Microsoft.DotNet.Tests
_firstDotnetVerbUseCommandResult = command.ExecuteWithCapturedOutput("new --debug:ephemeral-hive");
_nugetCacheFolder = new DirectoryInfo(testNugetCache);
}
}
[Fact]
public void UsingDotnetForTheFirstTimeSucceeds()
@ -135,4 +135,4 @@ A command is running to initially populate your local package cache, to improve
return s.Replace("\r\n", "\n").Replace("\r", "\n");
}
}
}
}