From 6a0ff067c8a6f8c2a4f51a49d7c5a493959b1b24 Mon Sep 17 00:00:00 2001 From: ell <77150506+ellraiser@users.noreply.github.com> Date: Fri, 6 Oct 2023 14:39:43 +0100 Subject: [PATCH] fixed test.filesystem.openFile --- .github/workflows/main.yml | 6 +++--- testing/tests/filesystem.lua | 9 +++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 31c982836..c5ae7da5b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -206,9 +206,9 @@ jobs: name: love-windows-${{ steps.vars.outputs.arch }}${{ steps.vars.outputs.compatname }}-dbg path: pdb/Release/*.pdb - name: Build Test Exe - run: cmake --build build --config Release --target install + run: cmake --build build --config Release --target testbuild - name: Run All Tests - run: install\love.exe testing --console --runAllTests + run: testbuild\love.exe ./testing/main.lua --console - name: Love Test Report uses: ellraiser/love-test-report@main with: @@ -244,7 +244,7 @@ jobs: name: love-macos path: love-macos.zip - name: Run All Tests - run: love-macos/love.app/Contents/MacOS/love testing --runAllTests + run: love-macos/love.app/Contents/MacOS/love testing - name: Love Test Report uses: ellraiser/love-test-report@main with: diff --git a/testing/tests/filesystem.lua b/testing/tests/filesystem.lua index a360dc6d8..248aa39c4 100644 --- a/testing/tests/filesystem.lua +++ b/testing/tests/filesystem.lua @@ -231,10 +231,11 @@ end -- love.filesystem.openFile -- @NOTE this is just basic nil checking, full obj test are in objects.lua love.test.filesystem.openFile = function(test) - test:assertNotNil(love.filesystem.openFile('file2', 'r')) - test:assertNotNil(love.filesystem.openFile('file2', 'w')) - test:assertNotNil(love.filesystem.openFile('file2', 'a')) - test:assertNotNil(love.filesystem.openFile('file2', 'c')) + test:assertNotNil(love.filesystem.openFile('file2.txt', 'w')) + test:assertNotNil(love.filesystem.openFile('file2.txt', 'r')) + test:assertNotNil(love.filesystem.openFile('file2.txt', 'a')) + test:assertNotNil(love.filesystem.openFile('file2.txt', 'c')) + love.filesystem.remove('file2.txt') end