aboutsummaryrefslogtreecommitdiff
path: root/spec/04-term_helper.lua
diff options
context:
space:
mode:
Diffstat (limited to 'spec/04-term_helper.lua')
-rw-r--r--spec/04-term_helper.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/04-term_helper.lua b/spec/04-term_helper.lua
new file mode 100644
index 0000000..7fd39d2
--- /dev/null
+++ b/spec/04-term_helper.lua
@@ -0,0 +1,13 @@
1-- sub-script executed for isatty test
2local writefile = require("pl.utils").writefile
3local isatty = require("system").isatty
4assert(arg[1] == "--", "missing -- argument")
5local tempfile = assert(arg[2], "missing tempfile argument")
6
7-- print("my temp file: ", tempfile)
8
9assert(writefile(tempfile, [[{
10 stdin = ]]..tostring(isatty(io.stdin))..[[,
11 stdout = ]]..tostring(isatty(io.stdout))..[[,
12 stderr = ]]..tostring(isatty(io.stderr))..[[,
13}]]))