blob: c6bbfcf084ce945f93f723194d8fc09ba8e0d00c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
-- Copyright (C) 2024 The Qt Company Ltd.
-- SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
local T = require("qtctest")
local a = require('async')
local Utils = require('Utils')
local Qt = require('Qt')
local function testDirEntries()
local u = require("Utils")
local d = u.FilePath.currentWorkingPath()
print("CWD:", d)
local result = a.wait(d:dirEntries({}))
print("RESULT:", result, #result)
end
local function testSearchInPath()
local u = require("Utils")
local d = u.FilePath.fromUserInput('hostname')
local result = a.wait(d:searchInPath())
print("Hostname found at:", result)
end
return {
testDirEntries = testDirEntries,
testSearchInPath = testSearchInPath,
}
|