summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSaikari <[email protected]>2026-01-29 04:19:55 +0300
committerGitHub <[email protected]>2026-01-29 04:19:55 +0300
commit3ab13106137658925e66cd387739276f8cfd9d8e (patch)
tree2b81243f04a35fb355c6df391bcf0d11e1a41849 /tests
parentc94c14fb23d09af85672f2e7dd1081b4976822c5 (diff)
parent45f856e3ccdec7da98ac7f07251f30d85640d268 (diff)
Merge branch 'xmake-io:dev' into nimlib
Diffstat (limited to 'tests')
-rw-r--r--tests/modules/io/test.lua14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/modules/io/test.lua b/tests/modules/io/test.lua
index 2b8bad8bf..a87151e32 100644
--- a/tests/modules/io/test.lua
+++ b/tests/modules/io/test.lua
@@ -160,3 +160,17 @@ function test_convert(t)
os.tryrm("temp")
end
+
+function test_read_proc_cpuinfo(t)
+ if not is_host("linux") then
+ return t:skip("wrong host platform")
+ end
+ if not os.isfile("/proc/cpuinfo") then
+ return t:skip("missing /proc/cpuinfo")
+ end
+ local data = io.readfile("/proc/cpuinfo", {encoding = "binary"})
+ t:require(data and #data > 0)
+
+ local data2 = io.readfile("/proc/cpuinfo")
+ t:require(data2 and #data2 > 0)
+end