From 0cef0b4932b3954b484aa99accf6f59f29caca7b Mon Sep 17 00:00:00 2001 From: realmarv Date: Tue, 4 Jul 2023 14:36:46 +0330 Subject: [PATCH] FileConventions: failing test for unzip --- ...yml => DummyCIWithAcceptedNonVerboseFlag1.yml} | 0 .../DummyCIWithAcceptedNonVerboseFlag2.yml | 11 +++++++++++ src/FileConventions.Test/FileConventions.Test.fs | 15 ++++++++++++++- 3 files changed, 25 insertions(+), 1 deletion(-) rename src/FileConventions.Test/DummyFiles/{DummyCIWithAcceptedNonVerboseFlag.yml => DummyCIWithAcceptedNonVerboseFlag1.yml} (100%) create mode 100644 src/FileConventions.Test/DummyFiles/DummyCIWithAcceptedNonVerboseFlag2.yml diff --git a/src/FileConventions.Test/DummyFiles/DummyCIWithAcceptedNonVerboseFlag.yml b/src/FileConventions.Test/DummyFiles/DummyCIWithAcceptedNonVerboseFlag1.yml similarity index 100% rename from src/FileConventions.Test/DummyFiles/DummyCIWithAcceptedNonVerboseFlag.yml rename to src/FileConventions.Test/DummyFiles/DummyCIWithAcceptedNonVerboseFlag1.yml diff --git a/src/FileConventions.Test/DummyFiles/DummyCIWithAcceptedNonVerboseFlag2.yml b/src/FileConventions.Test/DummyFiles/DummyCIWithAcceptedNonVerboseFlag2.yml new file mode 100644 index 000000000..1a722cfa2 --- /dev/null +++ b/src/FileConventions.Test/DummyFiles/DummyCIWithAcceptedNonVerboseFlag2.yml @@ -0,0 +1,11 @@ +name: CI + +on: [push, pull_request] + +jobs: + file-conventions: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: unzip a file + run: unzip -n path-to-file.zip diff --git a/src/FileConventions.Test/FileConventions.Test.fs b/src/FileConventions.Test/FileConventions.Test.fs index 479ec1413..d492ec96c 100644 --- a/src/FileConventions.Test/FileConventions.Test.fs +++ b/src/FileConventions.Test/FileConventions.Test.fs @@ -581,7 +581,7 @@ let NonVerboseFlagsInGitHubCI3() = (FileInfo( Path.Combine( dummyFilesDirectory.FullName, - "DummyCIWithAcceptedNonVerboseFlag.yml" + "DummyCIWithAcceptedNonVerboseFlag1.yml" ) )) @@ -612,3 +612,16 @@ let NonVerboseFlagsInGitHubCI5() = )) Assert.That(NonVerboseFlagsInGitHubCI fileInfo, Is.EqualTo false) + + +[] +let NonVerboseFlagsInGitHubCI6() = + let fileInfo = + (FileInfo( + Path.Combine( + dummyFilesDirectory.FullName, + "DummyScriptWithAcceptedNonVerboseFlag2.fsx" + ) + )) + + Assert.That(NonVerboseFlagsInGitHubCI fileInfo, Is.EqualTo false)