From b0549448b57d618a09e9c3fb04a1bc18cc1813bf Mon Sep 17 00:00:00 2001 From: Ayooluwa Isaiah Date: Sat, 5 Oct 2024 05:44:45 +0100 Subject: [PATCH] update tests --- .github/workflows/test.yml | 11 ++++++++++- replace/replace_test/variables_test.go | 2 +- validate/validate_test/validate_unix_test.go | 3 +++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 72974af..b65b89d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,7 +12,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-latest, ubuntu-latest, windows-latest] + os: [ubuntu-latest] steps: - uses: actions/checkout@v4 @@ -24,6 +24,15 @@ jobs: - name: Use Exiftool uses: woss/exiftool-action@v12.92 + if: matrix.os != 'windows-latest' + + - name: Install winget + uses: Cyberboss/install-winget@v1 + if: matrix.os == 'windows-latest' + + - name: Install Exiftool + run: winget install exiftool --disable-interactivity --accept-source-agreements + if: matrix.os == 'windows-latest' - name: Run tests run: go test ./... -race diff --git a/replace/replace_test/variables_test.go b/replace/replace_test/variables_test.go index b131f6c..6038032 100644 --- a/replace/replace_test/variables_test.go +++ b/replace/replace_test/variables_test.go @@ -267,7 +267,7 @@ func TestVariables(t *testing.T) { "-f", ".*", "-r", - "{btime.YYYY}-{ctime.MM}-{now.DD}{ext}", + "{now.YYYY}-{ctime.MM}-{btime.DD}{ext}", }, }, { diff --git a/validate/validate_test/validate_unix_test.go b/validate/validate_test/validate_unix_test.go index a2759a6..c88abbd 100644 --- a/validate/validate_test/validate_unix_test.go +++ b/validate/validate_test/validate_unix_test.go @@ -1,3 +1,6 @@ +//go:build !windows +// +build !windows + package validate_test import (