Skip to content

Supporting line wise yanks, including paste and undo. #811

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

Merged
merged 8 commits into from
Nov 8, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
New - Build 'test-only' main module and run unit-tests as part of CI.
  • Loading branch information
springcomp committed Nov 6, 2019
commit f1213c5a777a2e93807354735aba705f8c828d93
17 changes: 16 additions & 1 deletion PSReadLine.build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ $binaryModuleParams = @{
Outputs = "PSReadLine/bin/$Configuration/$Framework/Microsoft.PowerShell.PSReadLine2.dll"
}

$xUnitTestOnlyModuleParams = @{
Inputs = { Get-ChildItem PSReadLine/*.cs, PSReadLine/PSReadLine.csproj, PSReadLine/PSReadLineResources.resx }
Outputs = "PSReadLine/bin/$Configuration/$Framework/Microsoft.PowerShell.PSReadLine2.UnitTests.dll"
}

$xUnitTestParams = @{
Inputs = { Get-ChildItem test/*.cs, test/*.json, test/PSReadLine.Tests.csproj }
Outputs = "test/bin/$Configuration/$Framework/PSReadLine.Tests.dll"
Expand All @@ -114,6 +119,13 @@ task BuildXUnitTests @xUnitTestParams {
exec { dotnet publish -f $Framework -c $Configuration test }
}

<#
Synopsis: Build "test-only" PSReadLine module
#>
task BuildXUnitTestModule @xUnitTestOnlyModuleParams {
exec { dotnet build -f $Framework -c $Configuration PSReadLine /p:UnitTests=yes }
}

<#
Synopsis: Build the mock powershell console.
#>
Expand All @@ -136,7 +148,10 @@ task GenerateCatalog {
<#
Synopsis: Run the unit tests
#>
task RunTests BuildMainModule, BuildXUnitTests, { Start-TestRun -Configuration $Configuration -Framework $Framework }
task RunTests BuildMainModule, BuildxUnitTestModule, BuildXUnitTests, {
dotnet test .\PSReadLine\PSReadLine.csproj /p:UnitTests=yes
Start-TestRun -Configuration $Configuration -Framework $Framework
}

<#
Synopsis: Copy all of the files that belong in the module to one place in the layout for installation
Expand Down
3 changes: 2 additions & 1 deletion PSReadLine/PSReadLine.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
<PropertyGroup>
<OutputType>Library</OutputType>
<RootNamespace>Microsoft.PowerShell.PSReadLine</RootNamespace>
<AssemblyName>Microsoft.PowerShell.PSReadLine2</AssemblyName>
<AssemblyName Condition="'$(UnitTests)' != 'yes'">Microsoft.PowerShell.PSReadLine2</AssemblyName>
<AssemblyName Condition="'$(UnitTests)' == 'yes'">Microsoft.PowerShell.PSReadLine2.UnitTests</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<FileVersion>2.0.0</FileVersion>
<InformationalVersion>2.0.0-beta5</InformationalVersion>
Expand Down