mirror of
https://github.com/skidoodle/ctx.git
synced 2026-04-28 11:17:42 +02:00
Add quick test and fix Windows clipboard check
Run `go test -v ./...` in the release workflow before GoReleaser. In the Windows test job replace Get-Clipboard with System.Windows.Forms::GetFileDropList(), check for "$PWD\ctx.txt" and improve success/error output.
This commit is contained in:
@@ -43,10 +43,11 @@ jobs:
|
||||
if: matrix.os == 'windows-latest'
|
||||
run: |
|
||||
./ctx.exe .
|
||||
$files = Get-Clipboard -Format FileDropList
|
||||
if ($files) {
|
||||
Write-Host "Clipboard contains: $files"
|
||||
if ($files.Name -contains "ctx.txt") { exit 0 }
|
||||
Add-Type -AssemblyName System.Windows.Forms
|
||||
$files = [System.Windows.Forms.Clipboard]::GetFileDropList()
|
||||
if ($files.Contains("$PWD\ctx.txt")) {
|
||||
Write-Host "Success: Clipboard contains ctx.txt"
|
||||
exit 0
|
||||
}
|
||||
Write-Error "Clipboard did not contain ctx.txt"
|
||||
Write-Error "Clipboard did not contain ctx.txt. Found: $files"
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user