From 1d5cf3529e9815ca9f8a72f272783dbdea530c5a Mon Sep 17 00:00:00 2001 From: ptvty Date: Sun, 31 Mar 2024 20:40:09 +0300 Subject: [PATCH] Add test run to test isElevated --- .github/workflows/ci.yml | 2 ++ Program.cs | 5 +++++ WinFileReadEvents.csproj | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 14c8cf8..59acdba 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,6 +10,8 @@ jobs: run: dotnet restore - name: Publish for win-x64 run: dotnet publish -r win-x64 + - name: Test run + run: ./bin/Release/net8.0/win-x64/publish/WinFileReadEvents.exe testRun - name: Get version id: package_version uses: KageKirin/get-csproj-version@v0 diff --git a/Program.cs b/Program.cs index 636d17b..75bbb80 100644 --- a/Program.cs +++ b/Program.cs @@ -15,6 +15,11 @@ static void Main(string[] args) string? filePath = (args.Length < 1) ? null : args[0]; + if (filePath == "testRun") { + Console.WriteLine("x|testRun"); + return; + } + using var session = new TraceEventSession("FileRead"); Console.CancelKeyPress += (sender, e) => session.Stop(); diff --git a/WinFileReadEvents.csproj b/WinFileReadEvents.csproj index 1ec1299..feed281 100644 --- a/WinFileReadEvents.csproj +++ b/WinFileReadEvents.csproj @@ -9,7 +9,7 @@ WinFileReadEvents enable enable - 0.1.1 + 0.1.2