File: os.lua

package info (click to toggle)
golang-github-yuin-gopher-lua 0.0~git20170915.0.eb1c729-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, experimental, forky, sid, trixie
  • size: 852 kB
  • sloc: yacc: 479; python: 73; makefile: 18
file content (18 lines) | stat: -rw-r--r-- 501 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
local osname = "linux"
if string.find(os.getenv("OS") or "", "Windows") then
  osname = "windows"
end

if osname == "linux" then
  -- travis ci failed to start date command?
  -- assert(os.execute("date") == 0)
  assert(os.execute("date -a") == 1)
else
  assert(os.execute("date /T") == 0)
  assert(os.execute("md") == 1)
end

assert(os.getenv("PATH") ~= "")
assert(os.getenv("_____GLUATEST______") == nil)
assert(os.setenv("_____GLUATEST______", "1"))
assert(os.getenv("_____GLUATEST______") == "1")