Skip to content

Commit

Permalink
feat: Get-Contentにエンコーディングを指定することで出力に失敗しないようにする
Browse files Browse the repository at this point in the history
  • Loading branch information
xztaityozx committed Dec 1, 2023
1 parent 358ccd1 commit d162604
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ jobs:
working-directory: ./test/e2e/${{ matrix.os }}
shell: pwsh
run: |
Install-Module -Name Pester -Force
Invoke-Pester ../test.ps1
- name: E2E test (bash)
Expand Down
6 changes: 3 additions & 3 deletions test/e2e/test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ $tests = Get-ChildItem '0*' | ForEach-Object {
$name=$_.Name;
$inputFile="$name/input";
$outputFile="$name/output";
$arguments=(Get-Content "$name/commandline");
$arguments=(Get-Content -Encoding utf8 "$name/commandline");

@{
Name = $name;
Expand All @@ -16,7 +16,7 @@ $tests = Get-ChildItem '0*' | ForEach-Object {

Describe 'sel on PowerShell' {
It "cat <inputFile> | sel <arguments> Returns <outputFile> (<name>)" -ForEach $tests {
$expected = Get-Content $outputFile;
Invoke-Expression "Get-Content $inputFile | ../../../dist/sel $arguments" | Should -Be $expected;
$expected = Get-Content -Encoding utf8 $outputFile;
Invoke-Expression "Get-Content -Encoding utf8 $inputFile | ../../../dist/sel $arguments" | Should -Be $expected;
}
}

0 comments on commit d162604

Please sign in to comment.