Browse Source

fixed test.filesystem.openFile

ell 1 year ago
parent
commit
6a0ff067c8
2 changed files with 8 additions and 7 deletions
  1. 3 3
      .github/workflows/main.yml
  2. 5 4
      testing/tests/filesystem.lua

+ 3 - 3
.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:

+ 5 - 4
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