Skip to content

Commit

Permalink
文件枚举测试
Browse files Browse the repository at this point in the history
  • Loading branch information
璀境石 authored and 璀境石 committed Jul 23, 2022
1 parent 79d6bf3 commit e5300f7
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions data/test/src/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ require("test_texture")
require("test_mesh")
require("test_stringpack")
require("test_log")
require("test_filesys")

function GameInit()
window:init()
Expand Down
Empty file added data/test/src/mod/test.lua
Empty file.
22 changes: 22 additions & 0 deletions data/test/src/test_filesys.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
local test = require("test")

---@class test.Module.FileSystem : test.Base
local M = {}

function M:onCreate()
local list = lstg.FileManager.EnumFiles("src/")
for _, v in ipairs(list) do
lstg.Print(v[1], v[2])
end
end

function M:onDestroy()
end

function M:onUpdate()
end

function M:onRender()
end

test.registerTest("test.Module.FileSystem", M)

0 comments on commit e5300f7

Please sign in to comment.